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

My server is unreachable without "www." prefix, even when trying it with ping.

The DNS entry looks like this:

$TTL 86400
@   IN SOA (
    2011010600   ; serial
    14400        ; refresh
    1800         ; retry
    604800       ; expire
    86400 )      ; minimum

@                        IN NS
@                        IN NS
@                        IN NS

@                        IN A
localhost                IN A
mail                     IN A
www                      IN A
ftp                      IN CNAME   www
imap                     IN CNAME   www
loopback                 IN CNAME   localhost
pop                      IN CNAME   www
relay                    IN CNAME   www
smtp                     IN CNAME   www

A DNS record of the same type for another domain on the same server is working with and without "www".

And the VirualHost config looks like this:

<VirtualHost *:80>


An nslookup for and shows different IPs! The wrong IP is from a former version of the DNS record. Maybe some DNS servers are not up to date, but I wonder why they are up to date with the www. version.

Any idea what could be wrong?

share|improve this question
Increment the serial after adding the default record to the zone? can you ping Or try nslookup or dig on and check the record. – Chris S Jan 6 '11 at 19:39
Can you do an nslookup for the name both with and without? What response do you get back? – mrdenny Jan 6 '11 at 19:41
Did you change your DNS recently? Check with your ISP (whoever "owns" the IP block your server is on). – USACASD Jan 6 '11 at 20:10
This may help:… – USACASD Jan 6 '11 at 20:58
Maybe the change hasn't propagated? try an nslookup or dig directly against your nameserver – Michael Lowman Jan 6 '11 at 21:00

In addition to incrementing the serial, as Chris S said in a comment, one small step often overlooked by those who don't work with DNS routinely is telling the DNS server to reload the file.

share|improve this answer

As far as I know, you only need the A record for www to resolve.

Hostname  IP Address 
share|improve this answer
The problem is that the domain doesn't resolve without www, not with it – Michael Lowman Jan 6 '11 at 21:39

Since almost all answers came in form of comments, I have to repeat a comment to answer the question.

The solution was: Increment the serial after adding the default record.

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.