How-to-Import-URL-Rewrites-to-Magento-2

Magento 2 Import URL Rewrites: Better Your Migration in Minutes

by Van Nguyen

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.

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:
magento 2 product auto redirects

Magento 2 product auto 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:
Magento 2 category auto redirects

Magento 2 category auto 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.   

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:

magento-2-import-url-rewrites-extension-csv-file

CSV file to complete URL Rewrites information

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.

magento-2-import-url-rewrites-extension-check-data

Validate the CSV file in Import/ export URL Rewrites extension

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 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-export

Export URL Rewrites with Magento 2 Import Export URL Rewrites extension

Conclusion

This 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.  

Please take a look for more helpful information:

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.

 

M2-Import.Export-URL-Rewrite

Next Reading Suggestions

© 2019 BSS Commerce owned by THANH CONG INTER ., JSC. All Rights Reserved.
Business registration certificate no. 0106064469 issued by Hanoi Department of Planning and Investment on 19 December 2019.
Legal Representative: Mr. Nguyen Quang Trung.