Rewrite Urls in Magento 2
10 May, 2017 / 2 MIN readAs we already know for merchants and marketers especially in regard to seasonal promotions, it is fundamental to be able to make Rewrite of URLs. With the new administration panel of Magento 2, it is very easy to configure SEO topics. In this case as I said Magento 2 gives us the option to create a rewrite of urls with 4 different configurations:
- Custom
- By category
- By product
- By CMS page
This last one is very important especially if we have landings pages that have obtained volumes of interesting organic traffic and that for this reason we are not interested in to delete it. Also a tip I’ve always heard and applied is that urls that are indexed with juicy traffic volumes should NEVER be removed, even if they are landings of seasonal campaigns like Black Friday or Valentine’s Day, to give an example. Then we will decide if we make a 302 or 301 redirect, this will depend on the SEO strategy we want to do.
The next step is to define where we will do that rewrite of Url if it will be in the Main Website store or the Default View of the store, in this case with the demo we have to “hack”, we have configured it for the view By default as we see in the following image.
Now comes the juicy, and what always creates doubts, I will fill in the following fields:
- Request of the url that we want to rewrite.
- Destination/Target path to where we want to do that rewrite.
- Select the type of redirect, permanent 301 or temporary 302 redirect.
- Field description why we are doing this, this is important to detail it especially when we do 302 redirect.
DO NOT FORGET, we are doing a rewrite of Url Custom. And now we take with an online store invented, to simulate the rewrite we fill the fields that we have commented, in this case we have done with a product. We made a 301 redirection because we have decided that it is a product that no longer exists or is out of stock and the new one with other features interests us to appear and to maintenance all the old traffic.
Well now that we have it clear and ready, we would give the Save button and ready :). As Arguiñano (Famous Chef, here in Spain) says: easy, simple and for the whole family.