A 301 redirect indicates that the web page or resource was moved from one location to another permanently.
It works by sending the 301 “Moved Permanently” HTTP status response code to the browser or web crawler along with the new destination URL.
image
The 301 redirect is the most common redirection method.
Unlike the 302 redirect (temporary redirect), the 301 redirect signals to search engines that they should update the URL of the resource in their index to a new one. For website visitors, there’s no difference between the 301 and 302 redirects.
If you move a piece of content from a certain URL and someone tries to visit it, they’ll get a “404 Page Not Found” error. A 301 redirect prevents that and forwards website visitors and search engine crawlers to the new URL.
Besides, the 301 redirection method transfers the link equity from the old URL to the new one, meaning that the PageRank will be preserved.
As Google’s John Mueller put it:
“For the most part that is not a problem. We can forward PageRank through 301 and 302 redirects. Essentially what happens there is we use these redirects to pick a canonical. By picking a canonical we’re concentrating all the signals that go to those URLs to the canonical URL.”
With that said, here are examples of when to use a 301 redirect:
There are several different ways to implement 301 redirects; your choice depends on the server and CMS your website uses.
The most common method, however, is the one that involves editing the website’s .htaccess file, which can be found in your website’s root directory.
If you’re looking to create a redirect for an individual page, for example, simply add the following line of code:
Redirect 301 /old-page.html /new-page.html
One thing to keep in mind before you proceed is that there are different types of web servers, so it is possible that your website doesn’t run on an Apache server - which is the only one that uses .htaccess.
In that case, these instructions wouldn’t work for you. Instead, you can check this guide if your site runs on Windows/IIS - and this if it runs on Nginx.
If you are using WordPress, you can simplify the process of implementing 301 redirects by using an SEO plugin:
RankMath, for example, is free and has this feature built-in. Another option for WordPress users is the free Redirection plugin, which allows you to create and manage redirects with ease.
When trying to identify technical SEO issues - including problems with 301 redirects - the best approach is using website crawlers designed for that purpose.
Ahrefs’ Site Audit and Webmaster Tools will simplify this process - and make it easier to find any 301 redirect errors.
Here’s how you can identify any 301-redirect-related issues - and what you can do to fix them:
Here are the most common 301-redirect-related issues - and what you can do to fix them:
Considering the security-related benefits and the fact that Google recognized HTTPS (Hypertext Transfer Protocol Secure) as a ranking signal in 2014, it makes sense to have an SSL certificate and migrate from HTTP to HTTPS.
When migrating to HTTPS, it’s typically recommended to do so by using 301 redirects. However, you could face some issues, such as failing to implement the HTTP to HTTPS redirect across all pages.
So, to ensure that your website’s visitors are actually seeing the HTTPS version of your website, use Ahrefs’ Site Audit to crawl your site and check the Internal pages report for any issues.
When there is more than one redirect between the original URL and the destination page, that is called a “redirect chain.”
While Googlebot doesn’t have an issue with following this chain of redirects, it might slow things down and affect the user experience negatively. It’s not a critical issue, but it is recommended to redirect directly to the destination page.
If that’s not possible, keep the number of redirects in your “chain” low - no more than three or at least fewer than five.
Broken redirects are links that redirect the user (and search engine) to a dead page - or, more specifically, one that returns an HTTP 404 Not Found response status code.
The issue with these so-called “dead” or broken links is that there is no way for Google’s bots or users to access the destination page, meaning they will likely leave the website.
Once you’ve identified broken redirects in the Internal pages report, you can fix the errors by:
The sitemap is a list of all the pages on a site that you want Google - or any other search engine - to find and index. As such, it should only include canonical and indexable pages that you want to be featured in search results.
And since a 301 redirect is permanent and implies that the initial URL is no longer in use, there’s no point in keeping such pages in your sitemap because Google will continue to crawl them.
To find and remove 301 redirects from your sitemap, you can either:
If your site contains links to relevant third-party websites, it would be wise to check for any “bad” external redirecting links from time to time.
Sometimes the resource you’re linking to gets redirected elsewhere, meaning that the URL now points to a different page - one that might be irrelevant or potentially harmful.
Unless you have checked for issues related to external redirecting links, you will have no way of knowing that it happened - and you’ll continue linking to it unintentionally.
You can use the Ahrefs Site Audit or Webmaster Tools to discover any links that lead to external 301 URLs and remove them manually.