Hello Magento cronies,
How are things going? Do visit How to Remove Customer Account Navigation Links In Magento 2 the previous article of Magento Tutorial Series. Today I am here with a very important tutorial for everyone who is facing traffic loss due to URL issues. In this tutorial I will try to guide you to overcome this problem in your Magento 2 Store.
When you redirect customers from the old pages to the new pages then there is a chance of traffic drop because the old address is not redirected to the new address of the page. Therefore, whenever these circumstances arise you have to enable the URL Rewrite which is the default option provided by Magento 2. Here, URL rewrite option makes you capable of editing your URL which you want to redirect so that the users who click on the old link will be redirected to the new link.
-First Add URL Rewrite In Magento 2 using Admin Panel.
How to enable URL Rewrites via the Admin Panel?
Step 1: Firstly, click on the admin panel from the left side and click on Configuration as displayed below.
Step 2: Click on Web Option as displayed below.
Step 3: Now, tap on Search Engine Optimization and set the Use Web Server Rewrites to ‘Yes’ and click on to Save Config as displayed below.
How to configure automatic URL Redirect?
Step 1: Tap on stores in the admin panel and go to Configuration as displayed below.
Step 2: Click on catalog>catalog as displayed below.
Step 3: Click on Search Engine Optimization drop-down menu and set Create Permanent Redirect for URLs if URL Key Changed to ‘Yes’ and click to Save Config as displayed below.
How to change product/category page URLs?
Step 1: Click on catalog>products and tap on the edit product you required to configure URL as displayed below.
Step 2: Click on Search Engine Optimization and update your URL accordingly and click on the Save button as displayed below.
After this the old URL will redirect to the new URL.
How to view Magento 2 URL Rewrites table?
Step 1: Click on Admin Panel and Navigate to Marketing>>URL Rewrites. The new redirects will be on the top of the rewrite table as displayed below.
Step 1: Navigate to Marketing>>URL Rewrites and tap on the Add URL Rewrite button as displayed below.
Step 2: Fill all the details accordingly.
Create URL Rewrite: Select your required option.
Store: Select your needed store view;
Request Path: fill out the new URL key and suffix;
Target Path: insert the targeted path;
Redirect Type:Select accordingly;
Description: Describe if Needed.
And tap on Save as shown below
Run php bin/magento indexer:reindex and the changes will be displayed.
Hence, you can make use of any method and successfully complete your requirement to rewrite the URL for new pages.
Therefore, the above described are the easiest methods to implement if you want to rewrite your Magento 2 store URL for a new page. If you find any difficulties in performing the above-given steps then feel free to get in touch with our Support Team.
Isn’t the tutorial interesting? Then do share with your Magento pals and make their work easy. Also comment down your reviews regarding the article.
Happy Magento Learning.