www and non-www help?

hutchy2010

Newbie
Joined
May 3, 2010
Messages
19
Reaction score
2
I use google webmaster tools to check my page rank and keywords. I have set my prefered domain to my site with www . The keywords for my site with www are as I want them, the words I think people will search for have high significance however the site without www has completely different keywords that have nothing to do with my site. Will this be affecting my google ranking? and how can i change this so the keywords are the same?
 
Hi I just started a 301 redirect thread last night.This will take care of you problems,not sure how to do it for you. I have windows server and i am using plain html.Check out the link 301 redirect for non www to www
 
use htaccess to change non www --> www

PHP:
# Redirect non-www to www 
RewriteCond %{HTTP_HOST} !^www\. 
RewriteRule (.*) http://www.youdomain.com/$1 [R=301,L]
 
So Thats it,just add my domain and put it my site on the index page only near the tittle ?Thanks ant
 
put it in .htaccess file on the root of your site where your index.php put
 
You know I just wrote a nice post and this happens all the time,I hit the back space to erase a letter and the post is gone.Point is this does not work on HTML on a godaddy windows host.Thanks (pised off)
 
You can check if the redirection is working properly by using this website

Code:
hxxp://www.stepforth.com/resources/server-header-checker-tool/

This is all great but i was having a little problem. After doing the redirection automatically, using hostgator redirection tool (does basically the same code antrvant provided), instead of redirecting www .blablabla.c0m to hxxp://blablabla.c0m it was redirecting to hxxp://blablabla.c0m/wp-content/w3tc/pgcache/_default_.html.gzip .

To fix this issue, add the redirection code on top of .htaccess, before the W3 Cache.

Hope this helps someone that runs into this issue.
 
Last edited:
Back
Top