Forum Moderators: Robert Charlton & goodroi
I checked on my toolbar, google and yahoo, if my site was indexed already. The search engines, G and Y, indexed gy.com instead of www.gy.com. Here are my problems:
1. I was reading about 301 redirect but I don't understand, could you give me the code?
2. I noticed in my blog that all my posted pages, the URL has no www. How can I add the www in wordpress everytime I post?
I appreciate if you can help me, thanks.
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
Please take further technical discussion about htaccess, 301 and so on over to our Apache Server forum [webmasterworld.com].
Other threads that you may find helpful:
WordPress And Google [webmasterworld.com] - Avoiding Duplicate Content Issues
Why "www" & "no-www" Are Different [webmasterworld.com] - the canonical root issue