What is 301 Redirect?
A 301 redirect is an HTTP status code that is sent by web servers to instruct browsers and search engines that a particular webpage has permanently moved from one URL to another.
This redirect not only sends visitors to the new URL but also passes the ranking power or SEO value from the old URL to the new one.
When should you use a 301 redirect?
There are several situations where a 301 redirect is recommended:
Rebranding or Renaming
If your business undergoes rebranding and you have a new website to reflect the change, you'll want to use a 301 redirect. This will allow you to move your users and the SEO value from the old site to the new one.
For example, if your old website was "oldbrand.com" and the new one is "newbrand.com", you'll want to implement a 301 redirect from the old site to the new site.
URL Structure Change
If you decide to change your website's URL structure for better organization or SEO, you'll also need a 301 redirect.
For instance, if you have a blog post with the URL "website.com/blogpost", and you decide to change your URL structure to include the date, such as "website.com/2023/07/blogpost", you'll want to redirect the old URL to the new one.
Merging Websites or Pages
If you have two pages on similar topics, and you decide to combine them to create a more comprehensive resource, you'll want to use a 301 redirect.
This way, visitors to the old page will automatically be directed to the new, combined page.
For example, if you have two pages "website.com/smartphones" and "website.com/mobiles", and you decide to combine them into "website.com/mobile-devices", you should use a 301 redirect.
If you decide to delete pages because they're no longer relevant or they're outdated, you should implement a 301 redirect to a relevant page instead of letting users land on a 404 error page.
For example, if you've previously had a webpage about a specific event that's now over, like "website.com/2023-event", you should redirect users to a page that hosts future events or relevant activities.
If your website shifts from HTTP to HTTPS, 301 redirects will be critical. This is because HTTP and HTTPS URLs are technically different, and without a redirect, you may end up with duplicate content issues and confuse search engines.
For example, redirecting "http://yourwebsite.com" to "https://yourwebsite.com" is necessary when securing your site with SSL.
For easy implementation of HTTP to HTTPS or HTTPS to HTTP URL redirects, utilize our HTTP vs HTTPS Redirects tool.
If you have content on a subdomain that you decide to move to your main domain, a 301 redirect will be necessary.
For instance, if you initially hosted your blog on a subdomain like "blog.yourwebsite.com" and decide to move it to a directory on your main site like "yourwebsite.com/blog", you'll need to use a 301 redirect to guide visitors to the new location.
If your website can be accessed by both "www.yourwebsite.com" and "yourwebsite.com", you may want to pick a preferred version and use a 301 redirect to avoid any potential duplicate content issues that could confuse search engines.
Remember, it's essential to ensure the new page is as relevant as possible to the old one when implementing a 301 redirect. This will help maintain the user experience and the SEO value of the original page.
How to do a 301 redirect?
Implementing 301 redirects depends upon the platform you use or the server your website is hosted on:
For WordPress Websites
With WordPress, it's quite convenient to set up a 301 redirect, especially if you're using plugins such as Yoast SEO Premium. In Yoast SEO Premium, the redirects manager tool is already available.
If you're using the free version or another plugin that doesn't support redirects, you'll have to install a dedicated plugin like Redirection or Rank Math.
These plugins provide an easy-to-use interface where you can input the old URL and the new URL for the redirect.
Here is how you can use them:
Yoast SEO Premium: In your WordPress dashboard, navigate to the Yoast SEO Premium plugin settings. You will find an option for 'Redirects.' Here, you can add the old URL in the 'Source URL' field and the new URL in the 'Target URL' field. Click 'Add Redirect,' and the 301 redirect will be set up.
Redirection Plugin: After installing the Redirection plugin, go to 'Tools' and then 'Redirection.' You'll find fields for 'Source URL' and 'Target URL.' After entering the appropriate URLs, ensure that the 'Group' is set to 'Redirections,' and the 'Match' is set to 'URL only.' Then click 'Add Redirect.'
For Shopify users, the process is straightforward. You'll navigate to the "Navigation" section under "Online Store" in your sales channels.
There, you'll see an option called "View URL redirects." Upon clicking, you'll find an option to "Create URL redirect." Simply add the URLs you want to redirect from and to, and save the changes.
Magento has inbuilt functionality for 301 redirects. The process differs slightly between Magento 1 and Magento 2.
Navigate to 'Catalog' and then 'URL Rewrite Management.'
Click on 'Add URL Rewrite.'
Select 'Custom' from the 'Create URL Rewrite' dropdown.
Fill in the 'ID Path,' 'Request Path' (old URL), and 'Target Path' (new URL), select 'Permanent (301)' in the 'Redirect' dropdown, and write a description. Click 'Save.'
Navigate to 'Marketing,' then 'SEO & Search,' and then 'URL Rewrites.'
Click on 'Add URL Rewrite.'
Select 'Custom' in the 'Create URL Rewrite' dropdown.
Fill in the 'Store,' 'Request Path' (old URL), 'Target Path' (new URL), select 'Permanent (301)' in the 'Redirect Type' dropdown, and write a description. Click 'Save.'
If your site is hosted on an Apache server, you have to make changes in the .htaccess file. This approach requires caution and expertise because errors can negatively impact your website.
You'll need to write specific rules under the "RewriteEngine On" section, which will tell the server how to handle the redirect. These rules will differ based on your specific needs, such as redirecting a single page, the entire site, or from HTTP to HTTPS.
If you are finding it difficult to generate the correct .htaccess code manually, feel free to use our handy .htaccess code generator tool for quick and accurate results.
Similar to Apache, setting up a 301 redirect on Nginx requires editing the .conf file on your server. Depending on your needs, you'll write certain lines of code that specify how to redirect URLs.
Remember, this method should only be performed by experts due to the potential risks involved.
Access your server root and find the .conf file.
Open the .conf file in a text editor.
Add your redirect rules inside a 'server' block. For example, to redirect a single page, add 'rewrite ^/old-page$ http://www.website.com/new-page permanent;'.
Save the .conf file and restart the Nginx server to apply the changes.
Remember, the task of implementing 301 redirects should be carried out carefully, as any missteps can lead to significant issues with your website's functionality and SEO performance.
Always back up your original files before making any changes, and seek professional help if you are unsure.
301 redirect and SEO
This loss would increase with each redirect in a chain. However, Google revised its policy in 2016, and a 301 redirect no longer results in PageRank loss.
This makes 301 redirects a powerful tool for preserving and improving organic traffic.
However, there can be other SEO implications with 301 redirects which need careful consideration.
How to boost SEO using 301 redirects?
A 301 redirect is an essential SEO tool that can help prevent lost traffic when a URL changes, and it can also be used strategically to boost SEO performance.
Here are ways how you can use 301 redirects to enhance your SEO:
Merging Duplicate Content
If you have similar or duplicate content spread across different pages, it may be better for your SEO to merge these into a single, authoritative page.
By doing so, you can consolidate your inbound links and page authority, which would otherwise be dispersed thinly across multiple pages, onto a single page.
This could potentially improve its ranking in search engine results. You can facilitate this process by employing a 301 redirect to guide both visitors and search engines from the previous duplicate pages to the consolidated, updated page.
To do this, you can use our tool 301 Redirect File or Directory.
Simply input the URL that you wish to redirect to the primary or canonical version, as well as the URL of the canonical page itself. This process will generate the necessary code, which can then be inserted into your .htaccess file.
Site Rebranding or Moving
If you're rebranding or moving to a new domain, 301 redirects can help you maintain your SEO equity. You can create a 301 redirect that sends all traffic from your old domain to your new domain.
This not only ensures that users find your new site, but also signals to search engines that your site has moved, helping to transfer the SEO authority from your old domain to the new one.
Cleaning Up Dynamic URLs
Dynamic URLs, which often include long strings of parameters and numbers, can be off-putting to users and challenging for search engines to crawl.
By creating clean, static URLs and using 301 redirects to send traffic from the dynamic URLs to the static ones, you can make your site more user-friendly and easier for search engines to index.
The importance of 301 redirects in SEO becomes particularly apparent during instances of website restructuring or reorganization.
When you alter the structure of your website, whether it's modifying the URL paths of your pages or transitioning from a subdomain to a subdirectory, it's essential to seamlessly guide your visitors and search engines to the new locations.
For instance, let's say you have a subdomain like "https://blog.mywebsite.com", and you're planning to shift it to a subdirectory, such as "https://mywebsite.com/blogs".
In this case, utilizing a 301 redirect again becomes crucial. By employing our 'Subdomain to Subdirectory Redirect' tool, you can streamline this transition.
Simply input the URL to which you want your subdomain to redirect, and the tool will handle the rest by generating a code.
Now you can paste this code into your .htaccess to redirect a subdomain to a subdirectory.
Correcting 404 Errors
404 errors can occur when a page is deleted or its URL is changed without a corresponding redirect being set up.
These errors can provide a poor user experience and may impact your SEO if important pages suddenly become unavailable.
By setting up 301 redirects from the deleted or moved pages to relevant existing pages, you can ensure a seamless user experience and maintain your SEO value.
Consolidating WWW and Non-WWW Domains
Search engines treat www.example.com and example.com as two separate websites. If you don't specify a preferred domain, your inbound links might get split between the two versions, diluting your SEO value.
You can choose a preferred domain and use a 301 redirect to send traffic from the non-preferred version to the preferred one, consolidating your link equity.
If you aim to redirect a 'www' URL to its 'non-www' counterpart, you can use our tool designed to ease this process.
Conversely, if your goal is to redirect a 'non-www' URL to its 'www' version, you can utilize our 'Non-WWW to WWW Redirect' tool.
This will generate the necessary code which you can conveniently paste into your .htaccess file.
Remember to implement your 301 redirects carefully and monitor your site's performance after making changes. Your 301 redirects should ideally lead to a page with similar content to the one being redirected.
Common 301 redirect mistakes
Despite the power of 301 redirects, they can sometimes be misused, leading to problems for both users and search engines.
Below are some common 301 redirect mistakes and tips on how to avoid them.
This is when a URL is redirected to another URL, which in turn is redirected to yet another URL, creating a chain of redirects. This can slow down site loading time and create a poor user experience.
Search engines may also stop following the redirects after a certain point, which can lead to lost link equity.
Solution: It's essential to conduct regular audits of your website's redirect rules. This ensures their necessity and helps eliminate any potential chains or loops. Always strive to use direct redirects when possible.
Redirecting to Irrelevant Pages
Redirecting a page to another page that is not relevant or does not contain similar content can confuse visitors and lead to a high bounce rate. Search engines might also see this as a deceptive practice.
Solution: Always redirect to a page that offers similar or related content. If a similar page does not exist, it might be better to return a 404 or 410 status code.
Not Redirecting All Versions of Your Site
If all versions of your site (HTTP, HTTPS, www, non-www) are not properly redirected to your preferred version, it can lead to duplicate content issues.
Solution: Be sure to set up proper redirects so that all versions of your site point to your preferred domain.
Neglecting to Update Internal Links
While 301 redirects can handle traffic to old URLs, it’s not a good practice to rely on them to handle internal linking on your site. This extra redirect can slow down your site and negatively impact user experience.
Solution: Whenever you change a URL that is linked internally on your site, make sure to update the internal links to point to the new URL.
Forgetting to Implement Redirects
When URLs change, especially during a site redesign or migration, it's common to forget to put in place 301 redirects from the old URLs to the new ones. This can lead to a loss of traffic and a drop in search engine rankings.
Solution: Plan your redirects carefully during a site redesign or migration and implement them as soon as the new URLs go live.
By keeping these tips in mind and regularly monitoring and maintaining your site's redirects, you can maximise the power of 301 redirects while avoiding common pitfalls.
301 redirects are crucial in website management and search engine optimization.
They help reroute users and search engines from an old URL to a new one, aiding in website restructuring, consolidation of duplicate content, and site migration or rebranding.
301 redirects must be used carefully, as incorrect implementation can lead to issues such as redirect chains, loops, or lost traffic. Regular audits can help prevent these problems and ensure optimal website performance.