Categories: General

How To Add URL Rewrite In Magento 2

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.

Initiation

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.

How to add URL Rewrite using the same-named button?

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.

Final Wrap-up

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.

Click to rate this post!
[Total: 2 Average: 5]
Gaurav Jain

Gaurav Jain is Co-Founder and Adobe Certified Expert-Magento Commerce Business Practitioner. Being Computer Engineer👨‍💻 and possessing Extensive Marketing skills he handles all kinds of customer Queries and his Happy😀 & Helping🙏 Nature makes customer's day Delightful. When he isn’t working, you’ll find Gaurav Reading on Books📖 or Traveling🚗. Also, he is Speaker at Magento Meetups.

Recent Posts

How to Integrate ChatGPT with Laravel Application?

In this guide, we'll explore how to integrate ChatGPT, an AI-powered chatbot, with a Laravel…

2 days ago

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

4 days ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

4 days ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

5 days ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

5 days ago

6 Innovative Tools Revolutionizing E-Commerce Operations

E-commerce has transformed the way consumers shop for products and services and interact with businesses.…

1 week ago