Non www to www Redirect htaccess Checker

www Redirect Checker


Enter a URL



About The www Redirect Checker

The www Redirect Checker tool checks for the permanent 301 redirect in your .htaccess for the www or non www version.

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 as search engines will technically see your site as two identical websites even though they are the same domain. For your preferred version, add to your .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 redirection itself, as the Rewrite Engine will already be running as specified in the file.

*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 a free review of your website HERE