DNS and domains
DNS and domains
DNS record types
Address record, used to associate a name with an IPv4 Address
Similar to an A record, except for IPv6
Canonical name, used to create domain aliases
Mail Exchange, this is used by MTAs to find out where to deliver the emails for this domain. There’s often multiple entries for MX, with priorities to allow mail to be delivered to the primary server under normal operation, but with secondaries ready in case there’s a problem
Name Server, this is the name servers for the domain
Plain text records, the meaning depends on the name of the record
Sender Policy Framework - SPF records are really just TXT records with a specific format, and are used to help reduce spam by containing information and rules on designated senders for the domain. Usually, you’ll set this according to the instructions given by your mail provider.
Service record, used for SIP and other protocols
a Reverse lookup record, to do address-to-hostname resolution, and is only created by the owner of the IP address. You might never need to create one of these.
Start of Authority record,
A sample DNS zone file.
@ 300 IN A 22.214.171.124 www 10800 IN CNAME antonyh.co.uk. @ 3600 IN TXT "google-site-verification=the-code-that-google-gave-you"
Line one, is the root site IP address, denoted by @. It is an internet A record, with a value of that IP address.
the first value is the name of the record, such as @ or www.
the second value is the cache time in seconds for this record. 300 is the minimum, and is often used during transitions. Other common values appear to be 3600 (3 hours) and 86400 (1 day).
Almost all the records you’ll come across are declared as ‘IN’ meaning they are internet DNS records. There are other namespaces that are used, including CHAOS. Mostly though these are of academic uses, and in all likelihood you’ll never see them.
one of a set of value to denote the type of this DNS record
this is the actual value of the record, and is subject to escaping, quote marks, and other rules.
anything following a ; on a line is ignored