Get started today!◦ Full contract buyout ◦ Up to $1,000 credit ◦ Free migrations
Chat with us
Home » Magento Guide » What is Magento development? » How to write redirect (301) rules for Magento 2

How to write redirect (301) rules for Magento 2

Learn how to write redirect rules — Permanent (301) or Temporary (302) — for Magento 2 websites. Much of the procedure and user interface will be familiar to Magento 1 users.

Get fast, reliable hosting for WordPress

Power your site with the industry’s fastest, most optimized WordPress hosting

Writing redirect (301) rules

How to write redirect rules for Magento 2 websites; much of the procedure will be familiar to Magento 1 users.

  1. Log in to your Magento 2 administrative panel.
  2. In the main menu, click Marketing.
  3. In the Marketing menu, click URL Rewrites.
  4. If you are familiar with Magento 1.x, Magento 2 uses the same interface from this point forward. Click Add URL Rewrite.
  5. Leave the Create URL Rewrite drop-down list on its default setting, Custom. Fill the Store,Request Path, and Target Path fields.
    • 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.
  6. In the Redirect Type drop-down list, select either 301 or 302, as appropriate.
  7. 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 your Client Portal.

Ready to get started?

Get the fastest, most secure WordPress.org hosting on the market.

Additional resources

How to remove index.php from your Magento site url →

Learn how to remove index.php from Magento urls for cleaner links.

How to disable caching in Magento →

Discover how to disable Magento caching for testing and development.

How to configure Magento 2 storefronts →

Explore multiple storefronts for managing different stores from one setup