In the previous post, we already introduced you how to configure URL Rewrites in Magento 2 so you can easily do it by yourself when setting up your stores. Today, we continue to show you how to rewrite URLs in Magento 2 manually and especially a new solution to optimize your work with Magento 2 Import URL Rewrites extension.
The Concept of URL Rewrites
A URL rewrite is a server-side procedure that converts a long and/or difficult URL into a short, clean version that users can easily remember and read or type. URLs are just web addresses that indicate where a resource may be found. However, they frequently have names that aren’t user – or search engine–friendly.
A freshly created page, for example, may have the URL https://bsscommerce.com/?page id=12345. Not only does neither the user nor the crawlers have any idea what this page is about, but it’s also confusing and forgettable, as one might imagine.
What is the process of URL rewriting?
So, the URL rewrite function essentially adds a layer on top of the original address, making it easier to discover, which makes sense—for example, rewriting https://bsscommerce.com/?page id=12345 to bsscommerce.com/url-rewrite.
When a URL rewrite happens, the URL remains unchanged in the browser, and the user is entirely unaware. However, the browser rewrites the URL into that convoluted jumble and sends a query to the servers behind the scenes.
There’s a common misconception between URL Rewrites and Redirect which is used when one resource is replaced by another.
When the server structure is modified, and resources are transferred from one folder to another, URL rewrites come in handy.
In this case, an administrator will simply rewrite the portion of the URL that the user-friendly URL points to. Because the resource was moved, it now has a new location, and a rewrite is required to point bsscommerce.com/url-rewrite to the resource’s new location.
The importance of URL rewrites has raised the demand for Magento 2 Import URL Rewrites extensions.
How to Rewrite URLs Manually in Default Magento 2
After enabling URL Rewrites and Automatic Redirects, you can easily create auto-redirect product and category URLs by ticking in the ‘Create Permanent Redirect for old URL’ checkbox, under URL keys of Product or Category Edit Page.
- For auto product URL redirects:
READ MORE How to create product URL Rewrites in Magento 2 for a detailed tutorial in Magento 2.
- For the auto category URL redirects:
Therefore, when you change URL keys in the product or category edit page, customers will be redirected to the new URLs without having any troubles, and your page is not affected regarding SEO and ranking.
However, there are 2 problems you have to face when using URL Rewrites:
- In case you have a lot of product and category URLs that need to be rewritten, you have to edit the URL one by one on the product or category edit page. Besides, adding new URL rewrites in Marketing→ SEO $ Search→ URL Rewrites is another way to rewrite these URLs. However, this is a disaster because it is a big work for you to solve and especially costs you much time and money.
- If you want to rewrite URLs of CMS pages or custom pages, how can you do while there is not any configuration to Create Permanent Redirect for old URLs in Edit pages? Therefore, you have to manually navigate Marketing→ SEO $ Search→ URL Rewrites and Add New URL Rewrite.
Hence, we developed Magento 2 Import URL Rewrites extension to help you solve the 2 above problems by importing URL Rewrites via a CSV file so that all URL Rewrites can be quickly updated simultaneously.
LET’S NAVIGATE to Magento 2 Import URL Rewrites extension to simplify your work.
How to Implement Magento Import URL Rewrites
To import URL Rewrites to Magento 2, you need to prepare a CSV file that includes all necessary information about these URLs, such as product ID, store ID, old path, the new path, and so on. This sample file is easily downloaded in the configuration of the module and has a format as below:
It can be seen that Magento 2 Import URL Rewrite extension allows you to import URL Rewrites of product, category, CMS page, and even custom page.
After preparing the complete CSV file, you need to select Import behavior as your demand and also validate the file by clicking Check data.
If the CSV file does not include any errors, you can quickly Import and receive a message about the successful process. On the contrary, in case the CSV file has problems, they are shown for you in detail to edit.
How to Export URL Rewrites in Magento 2
This Magento 2 Import URL Rewrites extension supports the export function and allows you to export all URL Rewrites or export URL Rewrites by Entity Type, Store View and Redirect Type. URL Rewrites are exported into a CSV file also.
Magento 2 Import URL Rewrites extension makes the task more effortless than ever because you don’t need to edit one by one or add each URL Rewrite in the backend. Manually editing costs time, money and human resources.
Therefore, Magento 2 Import URL Rewrites extension is absolutely an ideal solution to simplify your work and optimize your business.
Here is our series of Magento 2 Import Export functions. Please take a look for more helpful information:
- 6 Best Magento 2 Import Export Extensions for All Websites
- A Complete Guide on Product Import and Export in Magento 2
- How to Add New Product Attributes in Magento 2
BSS Commerce is one of the leading Multi-platform eCommerce solutions and web development services providers globally. With experienced and certified developers, we commit to bringing high-quality products and services to optimize your business effectively.
CONTACT NOW to let us know your problems. We are willing to support you every time.