Magento 301 Redirects: When and How To Properly Implement Them

When running an eCommerce website on the Magento CMS platform, you will eventually need to make 301 redirects. A 301 redirect ensures that when a page is permanently moved, the website visitors and the search engines are sent automatically to the corresponding new page. Or, they get intelligently redirected to the right category page; or […]

By Gentian Shero

When running an eCommerce website on the Magento CMS platform, you will eventually need to make 301 redirects. A 301 redirect ensures that when a page is permanently moved, the website visitors and the search engines are sent automatically to the corresponding new page. Or, they get intelligently redirected to the right category page; or to the home page. 301 redirects are handled instantly by the server based on a file named .htaccess. If you are running Magento, there are two easy ways to manipulate the .htaccess file so you can create 301 redirects.

If you do not bother with Magento 301 redirects, visitors will end up with a “404 – Page Not Found” error, which is a turn-off and can cost you valuable sales. You can make as many 301 redirects as you want. However, we advise you to not redirect to a redirect, that redirects to another redirect. Search engines might give up on making too many jumps.

Reasons why you might need Magento 301 redirects include:

  • you have moved from an old website to a new website

  • you no longer offer a certain product or category of products

  • you are changing URLs for search engine optimization reasons (SEO)

  • you are simplifying URLs to make them shorter

  • you are expanding URLs to make them more descriptive

  • you have changed a category or product name that affects the URL

  • you have stopped a Google Adword campaign

  • you have deleted a product attribute

  • you discover an embarrassing or damaging typo in the URL

  • there are external links to a page that does not exist

  • you need to permanently change the URL of a page for any reason

A 301 redirect is distinct from a 302 “temporary” redirect. The 302’s are used when a URL is being changed temporary, and the search engines react accordingly. Website visitors don’t really notice the difference. However, 302 redirects on permanent changes can really trip up the search engines and undermine your rankings. Best to use 301 redirects most of the time.

Let’s look at two recommended ways of setting up 301 redirects for Magento CMS websites: using Magento’s built-in redirect system, or using a Magento extension (especially useful for bulk redirects).

If you need help with your Magento store, call 845-656-3000 or Contact us here »

Magento’s Built-In Redirects

The internal URL Rewrite Management system in Magento is the default way to manage 301 redirects. Here is how you can manually create 301 redirects in Magento:

  1. Go to Catalog > URL Rewrite Management

  2. Click “Add URL Rewrite”

  3. From “Create URL Rewrite,” choose “Custom”

  4. Edit the URL rewrite information forms. The ID Path and Request Path are the old URL (including the .html). The Target Path is the new URL. In the “redirect” field, choose Permanent (301)

Depending on how your Magento is set up, it may handle 301 redirects automatically or on-the-fly. For example, if you change a category or product URL, it may redirect it without any effort on your part. You can test this by pasting the old URL into a new browser window and attempting to load the page. Your account needs to be set up to allow you the ability to edit links. Some Magento webmasters set up their systems so that a user can change the URL for a product using a field.

Unfortunately, there are times when you need to create dozens, hundreds, or even thousands of permanent redirects. The manual method above might take a great deal of time in this situation. For bulk redirects, we recommend an extension called “Optimise Web’s Mass 301 Redirects.”

Extension: Optimise Web’s Mass 301 Redirects

Optimise Web’s Mass 301 Redirects Magento extension can handle 301, 302 or any status of redirects. It’s very convenient to create a simple CSV (comma separated values) file in a text editor, MS Excel or spreadsheet. This plugin lets you upload the CSV into Magento, which saves tons of time when you have a lot of 301 redirects to handle.

Order of operations: If a website visitor or web crawler (search engine) request a URL that is missing, first Magento’s built-in routing system tries to find a replacement URL. If it doesn’t, then it looks at the data from the Optimise Web’s Mass 301 Redirects extension. If this fails, the 404 error appears.

The extension is available online at no cost. Install it, and follow the directions to get it set up. There are a couple of tricks you can try if it does not work right away, so persist and read the directions and troubleshooting tips. You can choose from several types of methods:

  1. Legacy: old-url;newurl

  2. Redirects System 1: old-url,new-url,status_code (this is much easier to edit because it gives the CSV file 3 columns).

  3. Query String Based Redirects: Perfect if your old website used search string queries. Also great for Magento sites that have stopped a Google Adword campaign, deleted a product attribute, and in other situations. Allows the use of a wildcard to match many similar searches.

Note that if you have a spreadsheet genius in your midst, you may be able to save time by using formulas in some cases.

Remember that the CSV file needs to be cumulative. This means you need to keep or re-download your CSV file, and add rows when you want to add more redirects. Your new CSV file will overwrite your old CSV file. You can easily upload your CSV file from within the extension.

The beauty of 301 redirects is you can have it all. You can elect to use Magento’s built-in URL Rewrite Management system when it’s convenient. And you can make lots of changes in bulk with Optimise Web’s Mass 301 Redirects Magento extension — and it’s free. Stay on top of your 301 redirects to improve SEO and the user experience.

Chief Strategy Officer at

Gentian, CSO and co-founder of Shero Commerce, guides the company and client digital strategies. He's an expert in technical SEO, Inbound Marketing, and eCommerce strategy.