What are Webhooks in Magento 2
Discover webhooks in Magento 2: a powerful tool to reduce manual workload for business owners. Learn how they work, their key features, and easy configuration tips.
Vinh Jacker | 11-11-2024
For webmasters or developers, the 301 redirect is actually not a new term. In fact, it’s an integral part of a process when you want to create a product, category, and custom relocations for any page on your online store.
So what’s a Magento 301 redirect, its benefits, and opportunities for an eCommerce site?
In this post, we will take you through all its aspects. Most importantly, how to create a Magento 301 redirect from the admin panel as well.
Are you ready? Let’s dive in!
Magento 301 redirect is a permanent way to forward bots and visitors to a new URL, transferring link equity in the process. Neglecting 301 redirects may result in 404 errors, negatively impacting your site’s crawling, indexing, and Google ranking.
Marketers often use this type of redirect for various scenarios, including:
Using 301 redirects on your website brings various benefits, including:
Each redirect serves specific purposes, but they are often confused when redirecting users and search engines to different URLs.
It’s crucial to choose the right type to maintain rankings and preserve your positive reputation built through backlinks and content creation.
301 Redirect: For permanent moves of a page to a new location, the previous page is replaced, and the new page appears in search results.
302 Redirect: Temporary redirection for a limited time until the URL is restored, used for temporary changes.
302 redirects serve as a temporary solution for web developers to make changes to a webpage without impacting the site’s overall SEO performance.
Using Magento 301 Redirects:
Using Magento 302 Redirects:
Many people misunderstand these 2 redirects regarding sending users and search engines to a different URL from the requested one. Each comes with its own usage purposes.
That being said, search engines sense the different types of redirects and handle them differently.
Selecting the correct redirect type ensures your current rankings and the positive reputation you’ve built via all backlinks and content creation.
301 redirect: Used when any page on your site has been permanently moved to a new location. It means that a new page will replace the previous one and is shown in your search results
302 redirect: A temporary redirect that navigates users and search engines to the new page for a limited time until it’s removed. Used when a URL is being changed temporarily
There are times when a web developer uses a 302 redirect instead of a 301 redirect, including:
Conduct A/B testing for webpage improvement on functionality or design
Collect clients’ feedback on a new page without affecting the web’s current site ranking on Google
In the process of updating a webpage but still want to give the web’s visitors a consistent browsing experience in the meantime
When a product of yours is temporarily out of stock or seasonal, you will want to redirect it to the nearest alternative to keep customers’ engagement
Temporary “special offer” landing pages
The 302 redirects refer to a temporary solution. Web developers use it to make some changes on a webpage without impacting the whole site’s SEO performance.
In cases, you use a Magento 301 redirect:
Google will remove their old page from their index, and the old page’s link equity is transferred to the new one. This type of redirect is better for SEO performance than the 302 since it maintains the web’s ranking and prevents search traffic decline as well
It should only be used if it is a permanent change. The search engines also need much more time to recognize the Magento 301 redirects, thus probably credit the new page with rankings
The content transfer is more complicated when it comes to changing the web’s domain. It takes you a significant amount of time to check them all correctly
In cases you use a Magento 302 redirect:
Google remains your original page on its index. No value or link equity is transferred to the redirected URL
The search engine will continue to index the old URL and consider the new location as temporary
When you use 302 instead of 301 for permanent page transition, link popularity might be divided between 3 URLs, thus hurting their search rankings on Google
If the wrong type of redirect has been set up, search engines may become confused, resulting in traffic loss. In fact, website visitors actually don’t notice the difference between 301 redirects and 302 redirects.
Site Audit Services
Mageplaza offers FREE site health check (15hrs) to help you identify any website flaws & weaknesses and fix them before they start costing you a fortune.
Explore MoreBelow are 3 easy steps for you to set up 301 redirects on Magento 2 websites.
Basically, this step is when you collect and write down all the old URLs and where they redirect to. The action’s purpose is to help you avoid unwanted mistakes.
Most importantly, you can organize your Magento 2 URLs when using 301 redirects more effectively and efficiently. We advise you to write all mapping URLs onto a Google spreadsheet for convenience.
Log in to your admin account on Magento 2
Navigate to Marketing > SEO & Search > URL Rewrites > Click on the “Add URL Rewrite” button in the top-left corner
Magento allows merchants to generate URL rewrite for items, categories, CMS pages, and custom URLs. You can select the URL types needed to redirect from the dropdown list on the settings page.
If you select Create URL Rewrite = For category/ For product/ For CMS page, the system will let you choose a specific category/ CMS page/ product that requires changes.
Back to the settings of a new URL Rewrite in the Magento store’s backend. Here, enter the required information in the field accordingly, particularly:
Choose Create URL Rewrite = Custom
Store: Select your wanted store view where you’re about to implement the URL Rewrite
Request Path: Enter in this field the URL of the page that you want to use the 301 redirects (the old web page) without the domain name - For instance, your URL is “https://www.example.com/abc.html,” just need to enter “abc.html”
Target Path: Fill in the new page’s URL without the domain name, just like the above field. Note: This part will be automatically filled if you select Create URL Rewrite = For category/ For CMS page/ For product earlier
Select Redirect Type = Permanent (301)
Description (optional): Enter a short description of why you use 301 redirect
Once completed, click on the Save button in the top-right corner. You can see the new URL rewrite when returning to the main working screen of Magento’s URL Reviews
To make sure nothing can go wrong, having a test after setting the 301 redirects is essential. You can:
Go to your store home page and try to open the old web page
Or search for the old URL on Google’s searching bar
If you successfully implement the 301 redirects on that web page, you will be redirected to the new page instead of the original one.
For those who’re searching for an automatic solution on handling a ton of 301 redirects at the same time. This module helps your transition to new URLs more smoothly and conveniently.
Notable things about Magento 2 SEO Redirect:
Enable the admin to replace an old URL via pop-ups
Automatically redirect customers from wrong or old URL to the home page
Enable both 301 and 302 redirects at the store’s backend
Update the URL redirection in the URL Rewrite information form automatically
In fact, SEO Redirect is a minor feature of Mageplaza’s SEO solution for Magento 2 stores.
Along with its ability to manage and handle 301 and 302 redirects, this module comes with a wide range of other outstanding features focusing on improving SEO performance.
These are all of the most important things you should know about Magento 301 redirects. We hope this article is helpful for you.
If you have any questions, please feel free to let us know. Thanks for reading!