Contact
Site: US UK AU |

How to write redirect (301) rules for Magento 2

How to write redirect (301) rules for Magento 2

Overview
This article shows how to write redirect rules for Magento 2 websites; much of the procedure will be familiar to users of Magento 1.x.

Take the following steps to write a redirect rule for your Magento 2 website:

  1. Log in to your Magento 2 administrative panel.

  2. In the main menu, click Marketing (Figure 1).


    Figure 1. Magento 2 main menu, Marketing selection.

  3. In the Marketing menu, click URL Rewrites (Figure 2).

Figure 2. Marketing menu, URL Rewrites selection.

  1. If you are familiar with Magento 1.x, Magento 2 uses the same interface from this point forward. Click Add URL Rewrite (Figure 3).


    Figure 3. URL Rewrites panel, Add URL Rewrite button.

  2. Leave the Create URL Rewrite drop-down list on its default setting, Custom. Fill the Store, Request Path, and Target Path fields (Figure 4).


    Figure 4. Store, Request Path, and Target Path fields with sample entries; Redirect Type drop-down list.

    • The Request Path is the original path.

    • The Target Path is the new path corresponding to the new web address. This will serve as the target of the redirect rule.

  1. In the Redirect Type drop-down list, select either 301 or 302, as appropriate (Figure 4).

  2. Click Save. If successful, you will see the message, “The URL Rewrite has been saved.”

     

    For 24-hour assistance any day of the year, contact our Support Team by email or through the Client Portal.

Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
 
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
How to disable caching in Magento 2
Added on Wed, Oct 12, 2016
How to configure Magento 2 cron jobs
Added on Tue, Mar 27, 2018
How to add admins in Magento 2
Added on Mon, Dec 12, 2016
How to enable CAPTCHA for user creation in Magento 2
Added on Mon, Feb 19, 2018
How to reset Magento 2 admin passwords
Added on Fri, Jun 3, 2016
How to set the return-path email in Magento 2
Added on Thu, Apr 21, 2016
How to disable maintenance mode in Magento
Added on Fri, Dec 15, 2017
How to set up Magento 2 to use your SSL certificate
Added on Tue, Oct 11, 2016
How to configure Magento 2 storefronts
Added on Wed, Dec 30, 2015
How to configure CDN access for Magento 2
Added on Thu, Mar 31, 2016