Having no www is better than having it. It's shorter, looks more "Web 2.0", and just isn't needed.
If you must, use mod_rewrite.
doesnt it affect indexing?
go to google webmasters tool to change whether to use 'www' or not while indexing your site.
Adding this to your .htaccess file should work:
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^yourdomain.com
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]
That will redirect
http://yourdomain.com to
http://www.yourdomain.com, whether you redirect to www or no www is just a matter of personal preference but it is a good idea to redirect to one or the other. Personally I prefer to use www because some people don't realize that the www is unimportant or don't recognize a URL without it.
You should use one or the other as search engines can count
http://mydomain.com and
www.mydomain.com as two seperate sites apparently - meaning any backlinks are split between the two which obviously has SEO implications.
Seems silly to me, but it's what the experts are saying. :s
thats what i thought, google or other search engines might think of it as two separate domains.
thanks for your help guys.
(2010-04-13, 11:04 PM)saintsinner Wrote: [ -> ]thats what i thought, google or other search engines might think of it as two separate domains.
thanks for your help guys.
Surely Google isn't that dumb?
Seems I've read somewhere that they ARE "that dumb" not to mention the fact you CAN have two separately hosted sites with the same domain and one being www and the other not (I've seen it done).
(2010-04-14, 11:22 PM)ladyunicornejg Wrote: [ -> ]Seems I've read somewhere that they ARE "that dumb" not to mention the fact you CAN have two separately hosted sites with the same domain and one being www and the other not (I've seen it done).
www is really just a subdomain like any other.