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

I want to create a record in my zone file which, by default goes to my webserver when I type in "" as opposed to "" <-- working.

can someone give me some pointers, I know this is probably very easy but the search terms lead google to just spit out useless info.

UPDATED (with zone file)



@   SOA (12 4h 1h 1w 1h)
@   IN  NS       IN      A       my.ip.add.ress
@               IN      A       my.ip.add.ress
sys                 IN      A       my.ip.add.ress
mail                    IN      A       my.ip.add.ress

                        IN  MX      10      my.ip.add.ress        IN  CNAME

Thanks very much!

share|improve this question
What's the actual question here? You want to remove the WWW part? If so, that's done by a HTTP Redirect (how depends on what web server you're using). DNS has no redirection capability. –  Chris S Jan 3 '13 at 14:56
no, when I type in the domain directly I get nothing in the browser, just a timeout, but if I use the I get my webpage as expected, I know you can redirect from the to the with httpd.conf/.htaccess but if I did this I would be redirecting to nothing because the dns is not right somewhere –  Alex Jan 3 '13 at 15:12
@Alex: You are missing two . in the last line. and should end with . as shown in my answer below. –  Khaled Jan 3 '13 at 15:13

1 Answer 1

up vote 2 down vote accepted

You need to have a part in your zone definition similar to this:

@                       IN      A       your.ip.addr.ress       IN      CNAME

To summarize, you define the A record for your domain and define a CNAME for it as

share|improve this answer
Thank Khaled, sadly no joy. I've updated the question with the zone file for the domain. I'm running an internal nameserver and it's all working except for removal of the "www". Any thoughts would be greatly appriciated. –  Alex Jan 3 '13 at 14:51
See Khaled's comment above -- in your updated zone file you declare a cname record: " IN CNAME" -- If you did that in your real zone file with the real names, you would actually be declaring a CNAME record for that pointed to "" because names that are not fully qualified (FQDNs) have the origin appended to them. The "."s at the end of the labels are very significant. A better declaration would be: "www in cname" –  Michael McNally Jan 4 '13 at 5:33

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.