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

I am trying to create a zone file which points example.com and www.example.com to my server's IP address. I read the docs, but am still having a hard time with it. Currently, the non-www version works, but the www doesn't. I don't get an config errors when I start bind. Here is my zone file:

$TTL 86400

@ IN SOA ns1.myserver.com.  postmaster.myserver.com. (
                        2010121801      ; serial number YYMMDDNN
                        1800 ; Refresh
                        600 ; Retry
                        864000 ; Expire
                        1800 ; Min TTL
                        )
                IN NS ns1.myserver.com.
                IN NS ns2.myserver.com.


IN A 99.99.99.99
www IN CNAME @
share|improve this question
2  
What does "it is not working" mean? What kind of error do you get? –  SvW Dec 20 '10 at 15:26
    
the www version just doesn't resolve –  smusumeche Dec 20 '10 at 16:34

1 Answer 1

up vote 1 down vote accepted

Why don't you just make an entry like

www IN 99.99.99.99

share|improve this answer
    
I think you mean 'www in A 99.99.99.99' but yes, this is how I generally handle this. –  kaerast Dec 20 '10 at 15:55
    
here's the final version that works $TTL 1800 @ IN SOA ns1.myserver.com. postmaster.myserver.com. ( 2010121904 ; serial 1800 ; Refresh 600 ; Retry 864000 ; Expire 1800 ; Min TTL ) IN NS ns1.myserver.com. IN NS ns2.myserver.com. IN A 99.99.99.99 @ IN A 99.99.99.99 www IN A 99.99.99.99 –  smusumeche Dec 20 '10 at 18:37

Your Answer

 
discard

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.