Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Does anyone know the solution to this problem?

I checked my zone file and there are 2 A records   14400   IN      A       ip.address.x.x

localhost       14400   IN      A

CNAME entries currently in my zone file

mail    14400   IN      CNAME
www     14400   IN      CNAME
ftp     14400   IN      CNAME

I'm On CentOs 5.2, by the way.

Thanks for the help!!

share|improve this question
@kbyrd: I don't understand your nit. How is that different from what he wrote? Are you confused about the trailing period? It's supposed to be there, however some DNS servers will automatically add it for you if you forget it. But it's good to put it there just in case. – davr Mar 29 '10 at 17:19
@jeff: Please tell us the actual problem. "doesn't work" doesn't tell us enough information. Does the hostname resolve to an IP address? Does it connect to the server? etc etc. – davr Mar 29 '10 at 17:20
@davr: domain doesn't resolve without the www. – jeff Mar 29 '10 at 23:22

This is most likely a web server configuration problem. You can confirm or deny this by ping/dig/nslookup the domain name both with and without the 'www.'. If pinging (for example) each hostname resolves to the same IP address, your DNS is working properly.

For Apache, the configuration in /etc/httpd/conf/httpd.conf should look something like:

<VirtualHost *:80>
    DocumentRoot /home/sites/
    ErrorLog /home/sites/
    TransferLog /home/sites/

Optionally, if you want to use mod_rewrite to enforce the 'www' component, add the following before the ending </VirtualHost> tag:

RewriteEngine on
RewriteCond %{HTTP_HOST}            !^$
RewriteRule ^/(.*)        $1 [L,R]
RewriteOptions inherit
share|improve this answer
Thanks for you help! I'm afraid, though, that my httpd.conf file looks just like your example for ServerName and ServerAlias so perhaps that not it. To confirm, pinging without www doesn't resolve. Would restarting something other than apache help? Thanks again for your time! – jeff Mar 29 '10 at 23:17

Either add an A record for www to point to your ip address, or add a CNAME for www to point to the root (each has it's own set of positives/negatives for large organizations, but either would make your www go).

share|improve this answer
Sorry, but i'm a novice at server configuation. How would this look like? Something like this?: 14400 IN A ip ? Also, is the amount of spacing significant? – jeff Mar 29 '10 at 16:42
I added my current CNAME entries in my original post for clarity. Thanks for the help! – jeff Mar 29 '10 at 16:47

Check your webserver configuration and ensure it is accepting connections to both and In Apache this would be the ServerAlias line.

share|improve this answer

Your Answer


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