Magento 2 redirects: comprehensive SEO guide

In the vast realm of Magento 2 e-commerce, redirects stand as a cornerstone to ensure both an efficient and SEO-optimized online presence. For Magento store operators, mastering Magento 2 redirects is key to enhancing user experiences and boosting search engine rankings.

Types of Magento 2 SEO redirects

  • 301 redirect (permanent redirect for Magento 2)
    • Description: indicates a page within Magento 2 has permanently moved to a new location.
    • When to use: when permanently relocating content within your Magento 2 store, merging sites/pages, or making domain alterations.
  • 302 redirect (found/moved temporarily in Magento 2)
    • Description: shows a short-term move in the Magento platform.
    • When to use: while evaluating a new Magento 2 page or if content is briefly moved for specific events.
  • 303 redirect
    • Description: used to redirect after form submissions to prevent duplicate form submissions when a user refreshes.
    • When to use: primarily after form submissions in Magento 2.
  • 307 redirect (temporary Redirect)
    • Description: similar to a 302 but is designed for HTTP 1.1. It indicates that the content is temporarily located elsewhere and the client should continue to use the same method for future requests.
    • When to use: when content has moved temporarily and will be back soon to the original location.
  • 410 Redirect (Gone)
    • Description: informs search engines that a page is permanently gone.
    • When to use: when content is deleted without a replacement.

Magento 2 redirects: best practices for SEO:

  • Prioritize the 301 for moves in Magento 2: this method transfers most link weight to the redirected Magento pages.
  • Avoid chain redirects: chaining multiple redirects together can slow down page load time and negatively impact SEO. Always try a direct redirect from the old to the new page in your Magento 2 store.
  • Regularly review redirects: periodically check the redirects to ensures that they all point to live, relevant pages. It can also help spot any loops or chains.
  • Update links pointing to redirected URLs: instead of just setting up a redirect and forgetting about it, update your internal links to point directly to the new location.
  • Monitor 404 errors: use tools to detect and fix 404 errors. Ensure that visitors and search engines always find the content they're looking for on your Magento 2 store. You can use the services to find the 404 errors and broken links: SEMrush, Screaming Frog, Ahrefs and etc.
  • Use redirects judiciously: while redirects are handy, they can slow down your site if overused. It's essential to strike a balance.

Challenges with Magento 2 Redirects:

Managing Magento 2 redirects isn't always smooth sailing. Here are some widespread issues

  • Magento 2 redirect loops: prevalent mishap where the browser becomes ensnared between multiple pages, endlessly redirecting due to potentially conflicting Magento 2 redirect rules.
  • Failed Magento 2 redirects (404 errors): users may encounter 404 error page instead of successful redirect. Typically happens when target URL is incorrect or removed.
  • Slow page loads due to Magento 2 redirects: multiple chained redirects or inefficient rules can slow down your site's load time.
  • Loss of referral data in Magento 2 redirects: when redirects aren't set up properly, referral data can be lost, making it challenging to trace back the source of your traffic in analytics tools.
  • Inefficient wildcard redirects: using wildcards can be a timesaver but if implemented correctly.
  • Conflicting rules in .htaccess: sometimes, conflicting rules in the .htaccess file can cause unforeseen redirect behaviors.
  • Ignoring query parameters: if you do not take into account URL query parameters during redirects it can lead to users landing on generic pages instead of the specific content they were seeking.

How to create Magento 2 redirects

To create a 301, 302 redirect in Magento 2, open the «Marketing» tab and select the «URL Rewrites» button.

Magento 2 redirect

Then hit the «Add URL Rewrite» button. Let’s quickly look through the available options:

  • Store – select the Store View for which the redirect will be enabled
  • Request Path – enter the URL to redirect
  • Target Path – enter the URL to which the page will be redirected
  • Redirect Type – select the redirect type between 302 (temporary) and 301 (permanent)
  • Description – enter optional description

Magento 301 redirect

After specifying all the details, hit the «Save» button.

Magento 302 redirect

That is it! Now the customers and search engines will be redirected to the correct page and never encounter with a «404 Page Not Found» error in your Magento 2 store.

Mageworx SEO Magento 2 redirects

Mageworx SEO Suite extension for Magento 2 provides a very powerful functionality to add and manage the SEO redirects in Magento 2. The main features are as follows:

  • Advanced customer 301/302 redirects.
  • Automatic redirects for deleted products.
  • Import/export redirects..

Related Products