Enter a URL
The 301 redirect checker tool checks for the permanent 301 redirection in an .htaccess for the www or non www version of a website.
If you can access your site using both the www and non www versions, then for best SEO practices it is advised to choose one over the other, as search engine crawlers will see the website as two identical sites even though they are from the same domain. For your preferred version, add to the .htaccess file one of the below examples and changing "yourdomain" to your own domain. Bare in mind if working with an existing .htaccess file on Apache servers, you must only place the 301 redirection itself, as the Rewrite Engine will already be running as specified in the file. Upon using the 301 redirect checker with implementation, a boost in website rank will be achieved.
*Example #1 Non www Version
Options +FollowSymLinks
RewriteEngine On
RewriteRule (.*) http://yourdomain.com/$1 [L,R=301]
*Example #2 www. Version
Options +FollowSymLinks
RewriteEngine On
RewriteRule (.*) http://www.yourdomain.com/$1 [L,R=301]
*Example #3 - Non www. Version
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.yourdomain\.com [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]
*Example #4 - www. Version
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301,NC]
Get an SEO audit of your website with the Website Review Tool