Traditional DNS Howto - Page 4
NS Records
Next we create NS records. These specify the name servers that are responsible for our domain. You must have at least one, however it is common practice to at least list two (you can list as many as you want) - if the primary name server fails, the secondary takes over:
NS server1.centralsoft.org.; |
Please note: the semicolon (';') does not mark the end of a line; instead it marks the beginning of a comment in a zone file. You can write
NS server1.centralsoft.org.; This is my primary name server. |
However, if you do not have any comments, you can as well write
NS server1.centralsoft.org. |
MX Records
As we want to receive emails on centralsoft.org, we must list the mail exchanger(s) for the domain. This is done with an MX record:
MX 10 server1.centralsoft.org. |
This record says that emails for centralsoft.org should be delivered to server1.centralsoft.org (which is the mailserver for the domain) with a priority of 10. You can list more than one mail exchanger:
MX 10 server1.centralsoft.org. |
Now if a mail is sent to centralsoft.org, the sending mailserver tries to connect to server1.centralsoft.org because it has a priority of 10. If server1.centralsoft.org cannot be reached (for whatever reason), then the sending mailserver will try to send the mail to mail.someotherdomain.com because it has a priority of 20 which comes next (you see: although 20 is greater than 10, it means less priority in this case).
Until now we have defined MX records for centralsoft.org only which is good for email addresses of the form [email protected]. Let's say we have an email address of the form [email protected]. Therefore we must create an MX record for subdomain.centralsoft.org:
subdomain.centralsoft.org. MX 10 server1.centralsoft.org. |
Please note the '.' at the end of subdomain.centralsoft.org. If you do not add it, then the origin of the zone is appended to the name. For example, if you wrote
subdomain.centralsoft.org MX 10 server1.centralsoft.org. |
without a '.', this would transfom to subdomain.centralsoft.org.centralsoft.org! Of course, this feature can be useful:
subdomain MX 10 server1.centralsoft.org. |
Now we only have subdomain, but because the '.' is missing at the end, it transforms to subdomain.centralsoft.org which is what we want. So
subdomain.centralsoft.org. MX 10 server1.centralsoft.org. |
or
subdomain MX 10 server1.centralsoft.org. |
are two notations for the same thing!