Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the setting I need to do to make the website work as and

Thanks Jean

share|improve this question

migrated from Jun 17 '10 at 16:03

This question came from our site for computer enthusiasts and power users.

You need to add a www DNS record. I would read this article.

share|improve this answer
+ eventually routing the request to the same folder / document-root – akira Jun 17 '10 at 14:44

Using as an example:

  1. Insert A records for and for in your DNS configuration, both to contain the IP address of your web server

  2. Configure your web server to redirect to

The latter is preferable to just having both sites serve the same document root, because then cookies will work more reliably.

share|improve this answer
Somewhat off topic, but 2. is not exactly trivial when you have an https canonical url and want to avoid certificate errors. – mika Jun 21 '10 at 7:50

The best practices way to do this in most cases is 2 DNS records. One 'A' Record for the root ( and one CNAME for the www prefix (

The only time you would use a redirect would be if you wanted force the URL to always display one address (i.e. always show even if they type in just or vice versa)

share|improve this answer

Read the following site for detail on CNAME.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.