Redirects | The Ultimate Guide to 301 URL Redirection

what is a 301 redirect
what is a 301 redirect

    Redirects

    Redirection is the process of sending one URL to another URL. The most common redirects are 301 & 302 redirects.

    What is a 301 redirect?

    A 301 redirect is an HTTP status code. It is used to permanently transfer a web page URL to another URL in the eyes of users and the search crawlers.

    Example
    When you type http://iconosquare.com/ you will be redirected to 

    Now before moving further you need to see what will you learn in this 3500 long article. So please fasten your seatbelts!!

    Why redirects are used in SEO?

    Redirects are one of the most essential tools to create a healthy SEO friendly website.
    There are different reasons behind why you should definitely use redirects like

    • Redirecting 404 pages to other pages.
    • Moving your website from non-www to www and vice-versa.
    • Redirecting your domain from HTTP to HTTPS.
    • Redirecting a deleted page to any other page to avoid 404 pages.
    • Redirecting your old domain to your new domain.
    • Changing the URL structure of a page or post.

    Type of redirects

    In 301, 302 & 307 redirects, the numbers 3xx here represent a range of HTTP status codes.

    And you also have an idea about 404 pages. This 404 error is also a part of the HTTP status code range 4xx. There are a total of 5 ranges of HTTP status codes.

    Now let's take a brief look at the types of redirects and how it influences your site health & SEO.

    The information below is just for an overview and the detailed information will be provided in the later section of the blog.

    301 redirect

    A redirect that redirects a URL to a different URL permanently. That means no use of the old URL again.

    When used
    1. Redirecting 404 pages.
    2. Moving the entire domain from non-www to www.
    3. Moving from HTTP to HTTPS.
    4. Merging similar blog post pages.

    Impact on SEO
    There will be no page rank loss after you redirect your pages to a different URL or similar content.

    302 redirect

    A 302 status code is used when the redirection is not permanent.
    That means you can use the URL again later.

    For the user, it will show the requested content moved to a different URL but it doesn’t say why it moved.

    When used
    When your own site is under any maintenance and you want users to get redirected to a different location for a short period of time.
    This redirect is not recommended when you are
    1. Moving your site to a new domain.
    2. Making a permanent redirect.

    Impact on SEO
    This redirect doesn’t pass any page rank value because this is a temporary redirect.


    307 redirect

    307 redirect is the precise version of 302 redirects.
    Unlike 302 it clearly tells the search crawlers that the redirect is temporary and will be back after some time.

    When used
    Same as 302 redirects.

    Impact on SEO
    No passing of link authority as crawlers will be notified that it’s temporary and the URL can be used later.


    Meta refresh redirects

    Meta refresh redirects are client-side redirect and other redirects like 3xx redirects are server-side redirects. It's the alternative to server-side redirects such as 301 & 302.
    Examples - "If you are not redirected in ten seconds, click here."

    When used
    1. Redirecting URLs after a certain amount of time.
    2. Updating dynamic content in web pages after the refresh.
    Caution. Do not use it if you are making a permanent redirect.

    Impact on SEO
    It is never recommended using this redirect, as it is really bad for user experience.

    Because the user may not want to get redirected to a different page which may result in dissatisfaction and security concerns.

    There is another one which is 308 redirect and it is hardly used. Similar to 301, it simply means that you follow the redirect page and never return to the old URL.

    Now you might be wondering what’s the difference between 301 & 308 redirect?

    compared to 301, the 308 redirect is relatively new and it is still unsupported by so many browsers and search crawlers.

    So there is a chance these redirects can be treated as empty pages by Google hence 404.


    Not redirects but similar

    410 deleted content

    Showing 404 pages is not only bad for user experience but it also affects your site health in the eyes of crawlers.

    So, it is recommended to redirect them to the homepage or any relevant pages.

    But if you don’t have any option but deleting it, then using a 410 status code instead of 404 makes total sense.

    This simply tells the search crawlers that the page is deleted and should be removed from indexed pages of your website.


    451 removed for legal reasons

    If you are facing any legal issues for any content on your page, then using 451 headers instead of deleting makes sense.

    Caution: I am no expert in this 451 status code. This is just to tell you what it actually means.

    How to Create a URL Redirection

    There are multiple ways to redirect pages like using Cpanel and for WordPress websites using some 301 redirect WordPress plugin.

    The most common method is Redirecting by editing your .htaccess file in your site's root folder. 

    So first thing first, let’s see how you can reach the .htaccess file.

    .htaccess file in Cpanel
    .htaccess file

    To get access to your .htaccess file you need to follow these steps
    • Open “File Manager” in Cpanel.
    • Now open the “Root” folder of the preferred website.
    • Open “public_html” and here will find the ".htaccess” file.


    Important. If you can't see the .htaccess file, click on “show hidden files” in the settings and save. Now you will find the .htaccess file.

    Now if you still can’t see it, you have to create one by yourself. To do that click on “File” on the upper left corner of the window and create a new file with the name .htaccess and click on “Create New File”.

    create .htaccess file
    Create .htaccess file
    • Next, save the file as .htaccess and click "Create New File".

    create .htaccess file in root folder
    Create new .htaccess file

    • After creating select that .htaccess file & click on the “Edit” button.

    edit .htaccess file in cpanel
    Edit .htaccess file in cpanel


    • A new window will open and you may find some codes in there.
    • Ignore all the codes and go to the bottom section & paste the redirection codes that will be provided in the later section of the article.
    • Save it & Done.

    Now if you are still confused about how to get access to .htaccess file. Then this video will surely help you.


    Important. .htaccess file is only accessible to the Apache webserver. If you are using Nginx then see this source and if you are Windows/IIS then this source will help.

    Now as we have the .htaccess file so let’s see how to do a 301 redirect.

    1. 301 Redirect from one URL to another

    Two ways to do this

    1. 301 redirect with .htaccess
    Think of it this way, you want to redirect an old page in your site to a new page.

    Old page URL - https://impactseo.blogspot.com/canonicalization.html

    New Page URL - https://impactseo.blogspot.com/canonical-url.html

    Paste the code below at the bottom of your .htaccess file. And save.
    Make sure to change your details before pasting the 301 redirect code.

    Redirect 301 /old-page.html /https://yoursite.com/new-page.html

    Important. Now you can notice that in the old page URL section I only have given the later part of the URL, not the full URL of the old page and in the new page URL section, I have given the full URL.

    So make sure if both pages are in the same domain, then for the old URL which you will redirect, you only have to put the later part of the URL, not the full URL.

    So for the above case, it will be


    Redirect 301 /canonicalization.html https://impactseo.blogspot.com/canonical-url.html

    2. 301 redirect in WordPress

    For WordPress websites redirecting is much easier. Use plugins like Redirection.


    redirect url in wordpress
    WordPress redirection plugin

    3. Redirect a domain to another domain

    Use the code at the bottom of the .htaccess file & save.

    Make sure to edit it with your details before pasting it.

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^oldsite.com [NC,OR]
    RewriteCond %{HTTP_HOST} ^www.oldsite.com [NC]
    RewriteRule ^(.*)$ https://newsite.com/$1 [L,R=301,NC]

    
    
    Important. In some cases, the  “RewriteEngine on” could be in the  .htaccess file beforehand. If yes, then you don’t have to use it again. Just copy the rest of the code and paste.
    4. Redirect from Non-www to www and vice-versa

    It’s easy to redirect your domain from non-www to www. Just copy the 301 redirect code and replace it with your credentials and paste it in the .htaccess file & save.

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^example.com [NC]
    RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]

    Similarly for www to the non-www version
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www.example.com [NC]
    RewriteRule ^(.*)$ http://example.com/$1 [L,R=301,NC]

    5. Domain redirect from HTTP to HTTPS

    Google always prefers HTTPS over HTTP. They also consider it as a ranking signal. Now if you are still using HTTP, your site will be marked as "not secure" by browsers as well as the crawlers, which is not recommended at all.

    So it is always recommended to use HTTPS over HTTP.


    Important.  You have to make sure you have an SSL certificate before you move from HTTP to HTTPS. Otherwise, it will show a “Not Secure” message.

    So, to redirect from HTTP to HTTPS, Just copy the code and paste it in the .htaccess file & save. No changes required in the code.
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    6. Redirect entire Domain from non-www to www & HTTP to HTTPS in a single time

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    Does using 301 redirect result as page rank loss?


    PageRank is one of the top essential ranking factors of a website.

    Question
    So now the question is when you redirect from page 1 to page 2 and the PageRank of page 1 that passes through to page 2 after redirection, will it be the same as before or there will be loss of PageRank after redirection?

    Answer
    Before 2016 it was said an estimated 15% of PageRank loss after reduction. Although the number may not be exact. This video published in 2013 gives a hint on this topic.



    But in 2019 it becomes official there will be no PageRank loss after redirection.

    Here is the official announcement.


    So if you today redirect Page 1 to page 2, page 2 will receive all the PageRank page 2 had.

    How to fix 301 redirect problems in your website

    I guess by this time you have an idea about redirects that are not limited to only two URLs linked to each other. It’s much much more.

    It is associated with your site’s health & SEO vividly.

    Now let’s see the most important 301 redirect issues that need your attention asap. 

    So let's show you how to fix 301 redirects and how does 301 redirect affect SEO.

    1. Remove 301 status code pages from your sitemap

    Talking about sitemaps, sitemaps are used by site owners to tell the search crawlers which pages to crawl & index.

    Now when you permanently redirect an old page to a new one. That old page technically no longer exists. So it does make sense to remove it from sitemap,

    Because every time search engine crawlers will have to visit the old page to implement the redirect.

    And this will hit your crawl budget, as that will be wasted on pages that are not necessary to crawl.

    Don’t worry the redirect will still work for the users if the users type in the old URL.

    How to find all the redirected URLs in your site & remove them from sitemap?

    To find what are the URLs that are using the 301 HTTP status code in the header
    • You can simply use this tool from convertcsv to download all the URLs on your website.
    • Just paste in your URL and bingo!!
    • Copy those URLs.

    url extractor tool
    URL extractor tool

    • Now to check the status codes of all the URLs. To do that go to this HTTP status code checker and paste it.
    • Now to remove them, you will have to add a noindex tag to all those pages which you have already redirected. In this way, crawlers will never index those pages.

    2. Fix 301 redirect chains & loops

    Redirect Chains problem
    Page 1 > Page 2 > Page 3
    As you can see when a user visits page 1 first they will be redirected to page 2 and then to page 3.

    This will not only affect your website user experience but also increases the loading time.

    Redirect loops problem
    Page 1 > Page 2 > Page 3 > Page 1 > Page 3 >[…]
    Look how confusing these.

    This not only kills the link but also the search crawler will be confused during crawling and thereby redirect will be counted as a 404 error.

    Now how to find these redirect chains & loops on your website?

    Use the HTTP status code checker to check your site’s URLs and to find their HTTP status codes.

    Now to identify them you can simply look for this

    For the redirect chain, it will look like this.

    Redirect chain
    Redirect chain

    For the redirect loop, it will look something like this.


    Redirect loop
    Redirect loop

    How to fix redirect chains & loops error?

    There are several ways you can fix this issue like
    • Replace it with a single redirect
    Replace the redirect loop or chain with a single 301 redirect to the final URL and to avoid confusion for the crawlers. 
    • Implement a Canonical tag instead of redirecting
    If you have 2 - 3 articles on the same topic and you want to redirect them to a single URL to avoid duplicate content.

    But the URL that you want to redirect to the new URL has a good engagement history which can be useful for the users. so, it is better to use a canonical tag in the old URL instead of redirecting them and hiding them from search results.

    In this way, the search crawlers will only see the new article but in the eyes of users, both the articles will be available.

    Thus you will not only prevent duplicate pages, but you will also get some link juice from the previously published article.

    More on canonical URLs in this source.

    • Replace redirected internal link
    Everyone uses internal links in their site’s content.

    But if the internal links are also redirected to some other URL, make sure to change those links with the final URL.

    3. Fix Broken redirects & 404 pages

    Broken redirect problem
    Broken redirect means when you redirect a page to a URL that is dead or no longer exists. Then it is called a broken redirect.

    In HTTP status code checker these redirects will look something like this



    Broken redirect
    Broken redirect


    Solution
    In this case, you need to remove those links or redirect them to some other URLs.

    Problem with 404 pages
    You already know that having 404 pages on your site is not preferred.

    So you need to redirect them to the homepage or some other relevant content.


    But what if someone types in the wrong URL of your site?

    It will still show the 404 error, right?

    But don’t worry it will not affect the health of your site because 404 pages are only harmful when they are crawlable and part of your sitemap.

    And a wrong URL is never crawlable.

    Caution. Make sure to redirect 404 pages to relevant pages, not to any pages you want.

    If the redirect is not relevant, then Google will treat it as soft 404’s.





    Google recommends if the 404 page has a good amount of high-quality backlinks, then it is much better to republish the content at the same URL rather than redirecting it somewhere irrelevant.

    4. 404 pages with backlinks

    404 pages are a problem when they have backlinks.

    If your 404 pages have any quality backlinks from other websites then make sure to redirect it somewhere relevant otherwise it’s just a waste of link juice.

    You can also republish the content at the same dead URL that has backlinks instead of redirecting.

    5. Redirected pages with traffic

    If your 3xx redirect pages are still getting traffic, that means Google hasn’t recognized them yet.

    But if you are in a hurry, paste that URL in Google Search Console for fast indexing.

    How 301 redirects can increase your site's organic traffic


    I hope by this time it is clear for you, how essential the 301 redirect is for SEO and site maintenance.

    If yes, then let’s see how you can use 301 redirects to increase your site’s organic traffic.

    There are two ways available


    1. Combine similar content
    For example, let’s assume you have two similar content on your website which are much similar in terms of information.

    Content 1 - “6 things to keep in mind before buying any Hosting”

    Content 2 - “How to choose the best hosting provider for your site”

    And both of them have average traffic and they also get traffic for the same keywords.

    They also have some do-follow backlinks.

    Now all you have to do is, merge the information of both the content in a single improved article and publish it in any of the two URLs.

    And redirect the other URL to this new content. And done.

    It will increase your traffic because


    • Combined page authority
    As 301 redirects don’t affect your PageRank anymore, one content will pass its page authority to another one. But it only works for similar contents. Otherwise, Google will treat it as a soft 404’s.
    • Improved Content
    If both the articles you choose are good content then merging them will only increase their value. So it kinda deserves the traffic.

    Caution. To keep the relevance factor high make sure to change the anchor link of this merged article if you interlink them in your site. 

    Use this link analysis to get anchor text of links on your site.
    2. Merge similar domains

    • You need to buy a similar website to yours.
    • Merge the content of both the site with 301 redirects.
    Here’s what happened to a website after they used this technique.

    traffic after merging domains
    Image Source - ahrefs.com

    It sounds easy, just to redirect one with another. But it isn’t.

    Your job is not done here. You have to redirect each of the content from your purchased websites to your existing website.

    So let me show you how to do this step by step

    Step 1
    Combine similar content and redirect them only if these conditions applies

    • Content has organic traffic
    • The content is relevant to your existing website
    • Merging them will make the combined version more improved. Otherwise, you can also rewrite the content.
    Step 2
    Delete or redirect pages that aren’t necessary.

    Pages like “About Us” & “Contact Us” in your purchased website has nothing to do with your existing site.

    So it does make sense to delete these pages with 410 status code.

    Redirect those pages from your purchased site to the existing site if they have no traffic or very small traffic. Redirect them to any similar content.


    Step 3
    Now if you do not find any similar content to redirect, then it makes sense to redirect those content to the home page.

    But what about soft 404’s here for irrelevant redirecting?

    The thing is if you do not redirect them to any page, Goggle will anyhow consider them as soft 404’s.

    So it isn’t a bad idea here to redirect them to the homepage.


    Important. Do not redirect content that has low-quality backlinks to the homepage.
    Then it will harm your site rather than improving. So it’s best to keep those in 404.
    Now to analyze your backlinks you can simply use this online tool by Seoprofiler.

    301 redirect checker for any websites

    You already know how to check 301 redirects of a website by the HTTP status code checker that was mentioned earlier.

    But if you have no bulk requirement of checking the HTTP status codes, you can simply use this chrome extension SEO Minion.

    You just enter any page in your browser and if the page has been redirected to somewhere else it will show something like this.

    I typed blog.ahrefs.com but the URL was redirected to https://ahrefs.com/blog/.

    redirect checker chrome extension
    Check redirects through chrome extension

    The best part is not only all kinds of redirects, but you can also check a lot of information about your On-Page SEO.

    Final thoughts

    Redirects are one of the most important assets when it comes to SEO & organic traffic. But before using it to its full potential, you need to make sure you fix the existing 301 redirect issues first.

    This is it for me. Please let me know if I have missed something. Connect with me on Twitter for any quires or please comment below. I will definitely respond to your queries with the best of my ability.

    1 Comments

    Post a Comment