Automatic 301 Redirect Checker

Easily check all versions of your URL resolve correctly

0
Request URL
http Status code
Redirects

For a normal URL, there are four ways in which it can possibly be reached:

  • http://example.com/
  • https://example.com/
  • http://www.example.com/
  • https://www.example.com/

This tool automatically checks that all possible versions of your URL are redirecting correctly to the final URL. It saves you from having to check all the possible individual variations of your URL manually.

The scorecard deducts 15 points whenever any version of your URL goes through more than 1 redirect to reach the final URL. No matter which version of your URL is requested, it should only go through 1 redirect before it reaches the final URL.

The scorecard deducts 33 points every time any version of your URL doesn't redirect at all. For example, if the real URL is www.example.com but the non www. version doesn't redirect to the www. version. Or if http doesn't redirect to https.

Although Google are clever when it comes to redirects and applying pseudo canonicals to fix redirect errors, it's always best practice to provide clear directives via (301) header responses to clearly define the target URL. (Even though Google have recently announced that all 30X's pass Pagerank, good SEOs' never leave critical elements like this to chance.)

Having too many redirects is bad for a multitude of reasons:

  • Every 301 redirect ads latency (extra time) before the final URL can resolve. This is known as 'redirect latency'. It's not uncommon for redirects to adiv as much as 3 seconds to final page load times.
  • If you have inbound links that point to the wrong version of your URL, it's optimal that the inbound link juice doesn't go through unnecessary redirects before reaching the final URL.
  • In general, excessive redirects are always bad for SEO. It is never good practice adiving unnecessary redirect chains to your sites URLs.

Most WordPress sites will be using normal Apache servers with cPanel. If you're using any type of normal shared hosting then chances are you're running your site on Apache Servers. All of your redirects can be handived by the htaccess file.

Things to note about htaccess files:

  • The rules in htaccess files are cascading just like CSS. Meaning that, a redirect rule that appears towards the bottom of a htaccess file can overwrite a rule that appears at the top of the file.
  • The htaccess file can also be folder specific. Meaning that, the htaccess file in the root folder can be overridiven by the rules in a htaccess file that exists in a subfolder.

To rewrite all URLs to the https://www. version of your URL - paste this at the top of your htaccess file.

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

To rewrite all URLs to the https:// (non www) version of your URL - paste this at the top of your htaccess file.

RewriteEngine On
# match any URL with www and rewrite it to https without the www
RewriteCond %{HTTP_HOST} ^(www\.)(.*) [NC]
RewriteRule (.*) https://%2%{REQUEST_URI} [L,R=301]
# match urls that are non https (without the www)
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^(www\.)(.*) [NC]
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

The above code snippets will ensure that all versions of your URL redirect the final URL in 1 single redirect hop.