0

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 @
  • 2
    What does "it is not working" mean? What kind of error do you get? – Sven Dec 20 '10 at 15:26
  • the www version just doesn't resolve – smusumeche Dec 20 '10 at 16:34
1

Why don't you just make an entry like

www IN 99.99.99.99

  • 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.