magento-2-301-redirect-seo

5-Minute Tutorial: Discover 301 Redirect Technique for Magento 2 Sites

by Stephanie Greene

“Why must every merchant do Magento 2 301 Redirect properly?”

– It is not only about your SEO efforts, but more importantly, your customer experience!

It is common that you change, disable, or remove some products, categories, and contents over time. Without redirection, their URL links on the SERPs or referral sites may result in a 404 Page Not Found error.

Such an entrance experience is annoying and customers no longer want to land on your Magento 2 website. Not to mention, search engine crawlers do not like these broken links and rank your website low!

Here we fix the case with a brief but descriptive tutorial with Magento 2 301 redirect best practices. Check right away!

DISCOVER all the reasons Why One Step Checkout Remains Superior For Every Online Store with statistics and facts!

What Is A 301 Redirect Definition?

Redirect is the act of sending both users and search crawlers to a different URL from the one they originally requested because the original URL is no longer available or useful.

3 types of redirect for eCommerce websites

3 types of redirects: 301 redirect; 302 redirect; meta refresh

However, not all redirect techniques are the same. The web owner can choose among:

  • 301 Moved Permanently– Recommended for SEO.
  • 302, “Found” or “Moved Temporarily”.
  • Meta Refresh.

301 Redirect Definition

In this post, we focus on the definition of Magento 2 301 Redirect.

Accordingly, Magento 301 redirects are to permanently send search engines and visitors to the new destination, telling them that the URL has changed to a new place with new content. The old one is useless forever, so the bots need not index that link anymore.

Why Do You Need to Set Up Magento 2 301 Redirect?

In UI/UX aspect

Visitors are eager enough to click on your link for more information. Yet, they are landed on a 404. Seriously?

Magento 2 301 redirect means relocating them to valuable content and streaming their shopping experience. Hence, they keep browsing and take a specific action, for example, placing an order.

In the SEO aspect

A better customer experience, for sure, results in a longer average time-on-page and a lower bounce rate. For your information, Google and some search engines consider UX improvement as a key factor to rank a website.

In addition, you can still attract incoming visitors to your Magento 2 website to increase your traffic and SEO juice.

More excitingly, the act of Magento 2 301 redirect will transfer almost all link equity, specifically the ranking power, to the redirected page.

Interested in how 301 redirect affects SEO? Check it out in our comprehensive Magento 2 SEO guide.

CHECK OUT  Magento 2 SEO Tips For ECommerce: Pay Attentions To These 10 Signals to discover all the secrets!

When to Apply Magento 301 Redirect?

magento-301-redirect
When 301 redirect is useful?

Magento 2 301 redirect is useful when:

  • Moving from HTTP:// to HTTPS://
  • Rebranding or renaming your Magento 2 domain name with a different URL (301 redirect new domain)
  • Merging various web conventions into a shared URL to maximize the authority of the domain
  • Redirecting deleted/removed contents to the more valuable ones (such as expired promotion with a great stop on SERP)
  • For example, we redirected https://bsscommerce.com/magento-website-development to https://bsscommerce.com/magento-services 

What Are The Differences Between Magento 2 301 Redirect & 302 Redirect?

From the users’ side, Magento 301 redirect and 302 redirect work the same as they are all relocated to a new URL and keep browsing.

However, there are still differences in how search engines treat 301 moved permanently redirect links and 302 temporary redirects. Consequently, this affects the ranking power of your websites. 

If your Magento 2 redirection settings are incorrect, your site’s traffic will undoubtedly drop.

301 vs 301 redirect
301 permanent vs 302 temporary redirect

But, no need to worry, this situation can be done quickly by a free extension like Yoast SEO Magento 2.

301 moved permanently redirect

Once you set a current link to 301 redirect, it takes the search engines some time to discover the newly redirected 301 page. Then, they will transfer the rankings and trust of the predecessor to the new one.

The search spiders will stop crawling and indexing the old link. You, on the other hand, can never retrieve that link.

Favorable as it is, the Magento 301, especially the 301 redirect new domain, requires a special command in .htaccess file (Apache server) and even more techniques when it comes to Windows servers.

Fortunately, you can use the Magento 2 SEO extension to complete this task in several clicks. We will get insight into this solution later.

GRAB the Brutally Honest Review: Yoast SEO For Magento 2 On Github

 RIGHT NOW!

302 temporary redirect

There are a few cases where a 302 redirect is appropriate. You hardly temporarily move a page then come back, don’t you?

We only suggest 302 temporary redirect in case of:

  • Currently fixing or maintaining the page/site
  • Running A/B tests of design issues or something else

At that time, search engines make an assumption that the Magento 2 redirect link will only stay for a while. They keep the old URL and might still show them on the search result pages. As a result, it might result in bad duplicate content and hurt your SEO efforts. Not to mention, the search engines do not pour the original ranking power to the new one.

The temporary redirect is truly confusing for both webmasters and search engines. However, it is easier to set up than 301 redirect – using Javascript or meta tag. That is why many merchants still choose to use this 302 redirect.

Again, we must re-confirm it is not SEO best practice. Do the right, or pay a heavy price!

How to Apply Magento 2 301 Redirect on Store?

Magento 2 URL Rewrites

Magento 2 Search Engine Optimization

Thankfully, Magento 2 does support 301 redirect by its nature. You can make Magento 2 redirects for any URL to a product, CMS page, or category within clicks.

Firstly, make sure you have enabled Web Server Apache Rewrites during the initial Magento setup. Go to Stores ⇒ Settings ⇒ Configuration ⇒ General and choose Web and expand the Search Engine Optimization tab.

Then, navigate to Marketing ⇒ SEO & Search ⇒ URL Reviews and Add New URL Rewrite.

Magento-2-redirects-url-rewrites

DON’T MISS OUT  8 Swift Clicks To Create Magento 2 URL Redirect if you’re a Magento 2 merchant!

Automatic Product Redirect

You can rewrite and redirect URLs separately as above, or you can configure your settings to generate a 301 permanent redirect upon any change in URL key of the product and category.

Under Stores ⇒ Settings ⇒ Configuration ⇒ Catalog, select the Catalog subitem. Expand the Search Engine Optimization section and set Create Permanent Redirect for URLs if URL Key Changed to Yes.

magento-2-redirects-search-engine-optimization

Magento 2 301 Redirect and Robot txt Disallow

301 redirect indicates the search engines not to index the old link any longer. However, it might take time. Many webmasters wonder whether to use robot txt disallow to fasten this process. – Hmmm. It depends.

This is an example of robot txt disallow:

User-agent: [user-agent name]
Disallow: [URL string not to be crawled]

Positively, the robot txt disallow suggests the search engine bots not crawling the page. Negatively, it might reveal valuable data if you did it the wrong way.

Know how to do robot txt disallow well, and don’t mistake it for robot meta tag. Or you should have Magento 2 SEO extension complete the task for you.

What Mistakes to Avoid When Applying Magento 2 301 Redirect?

Magento 2 301 redirect new domain is slick and easy, isn’t it?  However, you still need to be cautious and avoid the following mistakes. It is better safe than sorry!

Over Redirect

It’s kind of a dilemma, let me explain.

We’ve talked about how 301 redirect is an inevitable job during website maintenance and overall the running of your website. But 301 redirects are burdens on your crawl budget and loading speed.

Even though we secure link juice with the redirect, it still lengthens the time on customer and web crawlers’ journeys. That’s why you should consider alternative options before jumping to redirect in Magento.

avoid-url-redirect

If the content gets old to the new time – give it a glow up! Spend your time auditing your content to see areas where you can improve and press on it.

301 redirect loop

magento-301-loop
301 redirect loop causes error

Before performing a Magento 2 301 redirect, think carefully about whether you might need the old URL in the future. If yes, then you should choose 302 temporary redirect. Do not redirect your URL too many times, especially when page A is redirected to Page B, then for a while, the B is redirected back to the A.

Such a Magento 2 redirect loop makes search engines frustrated.

Chain redirects

magento-301-chain-redirect
Google stops crawling from the 4th or 5th link

Simply, a redirect chain includes one URL after another. For example, https://bsscommerce.com/magento-2-b2b.html redirects to https://bsscommerce.com/magento-2-b2b-extensions.html, then to https://bsscommerce.com/magento-2-b2b-extensions-package.html

(We don’t do like this, just an example.)

Then, both users and search engines have to wait for all redirects before stepping through. It breaks the UI/UX and tears down the SEO authority power.

No more than 4 Magento 2 URL redirects in a chain, we recommend.

Unhelpful content

That 301 redirect allows transferring almost most of SEO ranking power to the new place, many webmasters make use of it to do SEO tricks. Say, redirect all top links to a new page to rank it on the first page.

Never do that!

Always redirect 404 pages to pages with somewhat relevant content/key. When you redirect with no collocation, Google will treat that redirect as a soft 404 and you eliminate all the good things that could come from it.

You can see Google’s representative elaborates on this note:

If there is no similar/relevant page to spare, you should republish the content (which is now deleted but has a lot of link equity). The link juice is a great indicator that the page attracts people. And because now it disappeared, you should recreate the magic.

Make sure all redirect links must have valuable content that is associated with what users look for.

How to Fix 301 Redirect Not Working?

magento-301-failed
301 redirect failed!

You follow all the steps, but Magento 2 301 redirect does not work. What’s wrong?

For example,

  • URL Rewrite: Custom
  • Store: Default store view
  • Request path: customer/account/create
  • Target path: customer/account/login
  • Redirect Type: Permanent(301)

Firstly, try to flush the cache and reindex the whole website. Secondly, carefully check the request and target paths to ensure there is no abundant spacing or characters.

If the Magento 2 301 redirect still fails to work, then try adding this line to .htaccess in the root Magento 2 directory:

RewriteRule customer/account/create http://<mydomain>/customer/account/login [L,R=301].

Using 301 Redirects For Organic Traffic Gains

Now that we get all the mistakes out of the way, let’s talk about how we can use 301 for the sake of boosting traffic.

It’s a fact that no one likes every single type of alcohol, but one they mix in together to create a Long Island Ice Tea – it becomes easier to consume by everyone!

This concept applies the exact same for your content. If you find articles within your arsenal that are getting old with little SEO merits but have a similar niche – merge them into one. And then redirect others to the same big article.

Subsequently, your traffic and ranking will go up as the result of:

  • Better content: No doubt! Bigger content will always get rewarded in the algorithm. And from a reader’s standpoint, they will appreciate an article that has everything noted down which they can find easily without moving to another post.
  • Combining authority: We’ve discussed this earlier. Redirects hold the power of transferring your link equity and now that you have everything in one place – this works amazing.

CLICK HERE to get  10 First SEO Steps You Must Do Before Launching A Magento Website!

Recommended Magento 2 301 Redirect Extensions

301 redirect in Magento 2 is frequently requested. Hence, extension vendors have developed many Free & Paid extensions to meet the demand on Magento 2 directs.

Magento 2 SEO extensions by BSS Commerce

Magento 2 Extensions by BSS Commerce

Magento 2 301 Redirect is essential, however, it is not enough to make your website pop in the fierce eCommerce world. Here we recommend the ultimate SEO package to do almost all SEO optimizations for you.

  • Gather 9 Magento 2 extensions in one
  • Solve the duplicate content worries thanks to Canonical URLs, Hreflang Tags
  • Fasten indexation through the robots meta tags, HTML/XML sitemap
  • Improve UX/UI using SEO Advanced Breadcrumbs, 301 Redirect, Open Graph, and Twitter Cards
  • Enhance SEO metadata with meta tags template
  • FREE installation | 1-year support | free-lifetime update

 IN 5 MINUTES, ALL OF 13 Mindblowing Hacks SEO For Magento 2 is right on your pocket!

Magento 2 Import Export URL Rewrites by BSS Commerce

If you’re in the process of mass transforming/migrating your website, this extension is a life-saver.

With this add-on, you’re able to import 301 and 302 redirects type straight to your Magento store using a CSV file. In addition, we also ensure your importing success with validation of the content beforehand, and you’ll also receive the notification after the job is done.

magento-2-import-export-url-rewrites
check-now

Magento 2 404 Error Logger extension by Ravey Infosys

magento 2 url redirect- 404 Error extension
Magento 2 404 Error extension

This extension allows finding and fixing all 404 error pages that hinder visitors from checking out your Magento 2 website.

  • Record and report 404 Error Page
  • Show how many times a broken URL ends up to 404 error page
  • Support 301 redirect and 302 redirect to fix the 404 error

Magento 2 301 Redirect extension by Mage Array

Magento-2-redirects -free-extension
Magento 2 301 Free extension

This 301 redirect for Magento 2 module is FREE with basic features to perform 301 moved permanently. There is neither screenshot nor demo, hence, you might download and explore it yourself.

Wrapping Up

We completed the Magento 2 301 redirect today. Should you have any queries, let us know. We have experts who know SEO ins and outs, so we are all ears to solve your problems with 301 redirect in Magento 2 and other SEO optimizations.

BSS Commerce is one of the leading Magento extension providers and web development services in the world. With experienced and certified Magento developers, we commit to bringing high-quality products and services to optimize your business effectively. Furthermore, we offer FREE Installation – FREE 1-year Support and FREE Lifetime Update for every Magento extension.

CONTACT NOW to let us know your problems. We are willing to support you every time.

magento-2-seo-extension

 

 

Next Reading Suggestions

© 2019 BSS Commerce owned by THANH CONG INTER ., JSC. All Rights Reserved.
Business registration certificate no. 0106064469 issued by Hanoi Department of Planning and Investment on 19 December 2019.
Legal Representative: Mr. Nguyen Quang Trung.