Get Free Audit

How to Create Custom URL Rewrite and Set Up 301,302 Redirects in Magento 2

Sep 20, 2016

1073 Vladislav Yunusov

How to Create Custom URL Rewrite and Set Up 301,302 Redirects in Magento 2

The 301 redirect is one of the most important tools that are used for search engine optimization. 301 redirect will help you maintain existing search engine rankings, so you don’t lose traffic after the transition to another URL. And now in Magento 2 you have an ability to set up these redirects by default. It’s pretty easy to set up redirects for each type of url. But let’s take a look how to create a custom rewrite for redirecting to the new URL.

At first you should log into your Magento 2 admin panel. On the admin menu select Marketing->URL Rewrites.

How to Create Custom URL Rewrite and Set Up 301,302 Redirects in Magento

Here you can create a new URL Rewrite by clicking “Add URL Rewrite” button:

How to Create Custom URL Rewrite and Set Up 301,302 Redirects in Magento

Select “Custom” in the drop-down list and fill out “Target Path” field with already prepared URL key of the page where it should be redirected. For example: hero-hoodie.html

How to Create Custom URL Rewrite and Set Up 301,302 Redirects in Magento

Igor Dragun
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Igor

How to Create Custom URL Rewrite and Set Up 301,302 Redirects in Magento

After that fill out the “Request Path” field with a URL key of the page to be redirected. For example: besthoodie. And the last thing you should do is just to choose “Redirect Type”, let it be “Permanent (301)”.

How to Create Custom URL Rewrite and Set Up 301,302 Redirects in Magento

That is all. If necessary fill out the “Description” field and don’t forget to click “Save” button.

Now you can see your new rewrite at the top of the list.

How to Create Custom URL Rewrite and Set Up 301,302 Redirects in Magento

At the final step please test it out on the frontend, and make sure that it works properly.

magento custom development

Magento Custom Development

Take your online store to the next level with BelVG Magento Custom Development

Visit the page
Igor Dragun
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Igor

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *