Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

no www vs. www

my site is indexed as no www, what should I do?

         

adessa

6:17 am on Mar 31, 2007 (gmt 0)

10+ Year Member



I am new in making websites and I am slowly learning about indexing my pages. This time I used Wordpress to run my blog which I started last Monday. I have just posted my 11 page today.

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.

tedster

3:58 pm on Mar 31, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here is one approach - the code goes into your .htaccess file

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