Silly Question about Drupal

Status: 
Open
Question: 

I have got a rather silly question and I hope someone can provide an answer.

I have noticed with a lot of Drupal powered sites, that the "www" part of the hyperlink is absent, only the domain name is present - why is that and is there a workaround?

For example, this web site has the hyperlink - http://drupalfun.com rather http://www.druaplfun.com, the same applies to the drupal web site.

Responses

1. www.drupalfun.com works just

www.drupalfun.com works just as well.

2. www or not www

You need to look into 2 places
1 is the DNS
( www has to be a CNAME in your DNS)
and the other is your web server configuration.
So both www mydomain dot com(or whatever) and mydomain dot com( or whatever) point to the same web server
Some people use redirect so a request to www.mysite.com and to mysite.com - they both go to only 1 address
Your pick ;)
I personally use one without the www
www.existentia.com always redirects to existentia.com. (Both are valid )

3. Thanks for the replies.

Thanks for the replies.

4. .htaccess

If you look in the default .htaccess that comes with Drupal (in the root) you will see the commented lines (with a # before it) which will perform the redirect.

You only need to choose which one you want, replace the domain names with your own and uncomment.