Hello everyone, I was browsing google's webmaster tools and I found out that you can select the way google index your site, www.yourdomain.com or just yourdomain.com. I was wondering wich one should I choose
also make sure you redirect from the one you do not wish to use, to the one you are using. ie, 301 redirect from non-www to www Google regards this as duplicate content (with + without www) so you have to be careful. You can google for the mod-rewrite you need. Pierce
RewriteEngine On RewriteCond %{HTTP_HOST} !^(.*)\.domain\.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
Select any of the domains you want to promote. 301 redirect the other domain. Also set the preference in Google webmaster central.
what if I have pages indexed under both and change it now to www.site.com only? Will I keep the pages indexed?
hmmm, ok, let's say I have www.domain.com I already redirect it with 301 to www.domain.com/forum what code should I use to keep my redirection to /forum and redirect form domain.com to www.domain.com -___- I am confused
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^domain\.com [NC] RewriteRule ^(.*) http://www.domain.com/$1 [L,R=301] </IfModule> I had to add these extra lines in order to make it work for me
it will not change anythink but www and without www versions of your site must be redirected to one of them