Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to setup my DNS records to do the following:

When user hits www.example.com they are directed to server with ip
When user hits example.com they are directed to server with ip

I have full control over server, where I set up the DNS:

A record for example.com. to
A record for www to

I'am not sure if the DNS got refreshed but when I hit www.example.com I am hitting the and it displays a incorrect page as it is not set up to handle the www.example.com, but example.com only.

Thanks in advance,

share|improve this question
Suggest you specify what DNS you are running, tell us if it is an internal issue or for the whole internet, and post the config file if you can. –  tomjedrz Oct 9 '09 at 1:36

4 Answers 4

up vote 3 down vote accepted

It sounds like the DNS change has not yet propagated. This can take up to a day, or even more, depending on your DNS settings.

You can try the tools at dnsstuff.com to see what your different hostnames are resolving to, and if everything looks good there, then just wait a day or two for the changes to propagate.

share|improve this answer

You can also test your dns entries on Linux and Mac OS X by using the "dig" command



share|improve this answer
If he were on Linux, but we don't know that. –  DanBig Oct 8 '09 at 20:34
Edited my entry and added the OS info –  jomey Oct 8 '09 at 20:37
dig is available for Windows too. members.shaw.ca/nicholas.fong/dig. –  ThatGraemeGuy Oct 8 '09 at 20:59

You probably just need to clear your local DNS cache.

If you are on Windows, then run:

ipconfig /flushdns
share|improve this answer

To more directly answer your question, the zone file for example.com would have

@ A

www A

The @ stands in for the "root" of the zone (example.com in this case). All you ever specify is what comes before the "root", e.g., www for www.example.com.

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.