In search engines point of view, they are treated differently, and having the same website on both versions would be considered duplicate content and there will be a penalty. What you need to do is 301 redirect to the version you prefer. If you prefer the www.mysite.com version, then you will need to place the following code in your .htaccess file. This file is located under the web folder public_html/, and if there is no such file, you will need to create one or contact your host.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
This will force all visitors and spiders to www.mysite.com version, even if they visit your site through mysite.com. If you want to find out if its working or not, simply visit http://mysite.com and see if it changes to http://www.mysite.com
Using this 301 redirect code, I managed to redirect http://webmastertable.com to http://www.webmastertable.com but the problem I had was with the internal pages. The non-www version for any internal page would redirect back to the main page, instead of redirecting to the www version of the internal page. So this 301 redirect code did not work for my wordpress blog but I have found a wordpress plugin called Enforce WWW which did the job for me. So the code above might work or not, depending on what type of script your site is using.
Another thing to mention which is related to our subject is link building. It does matter if webmasters are linking to your site with www or without www. So pick the version you want and always use it when requesting backlinks.
Popularity: 4% [?]






Leave a Reply