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

A question about DNS zone files syntax (not sure if it's correct term here).

For my dedicated server I have the following zone file right now:

$TTL 86400
@   IN SOA ns1.first-ns.de. postmaster.robot.first-ns.de. (
    2013111400   ; serial
    14400        ; refresh
    1800         ; retry
    604800       ; expire
    86400 )      ; minimum

@                        IN NS      ns1.first-ns.de.
@                        IN NS      robotns2.second-ns.de.
@                        IN NS      robotns3.second-ns.com.

@                        IN A       144.76.184.151
localhost                IN A       127.0.0.1
www                      IN A       144.76.184.151
@                        IN MX 100  afarber.de.

And I wonder if the 2 lines (which use the same IP-address on the right side) could be written in a shorter form?

@                        IN A       144.76.184.151
www                      IN A       144.76.184.151
share|improve this question

1 Answer 1

Not exactly shorter but you can change the 'www' record to a CNAME over an A record. If you set it to a CNAME of your base domain, you will only have to update the primary A record for both to be changed.

share|improve this answer
    
Thanks. Do you mean www CNAME afarber.de.? –  Alexander Farber Nov 15 '13 at 11:59
    
I'm not actually sure, as I haven't used bind before. Just copy the rest of the syntax, which looks like it would be 'www IN CNAME afarber.de.' –  Peter Nov 15 '13 at 12:03
    
Peter is right. It is common to use www IN CNAME @ in Bind. Just copy paste that as a replacement to 'www IN A 144.76.184.151' –  Daniel t. Nov 15 '13 at 21:14

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.