These are 2 of the most common syntax errors I see in DNS records.
- Any entry with a fully qulified domain name needs a trailing period.
- Any TXT entry needs to have the value in double quotation marks ” “
For example on the fully qualified domain names, these are wrong:
domain.com IN A 188.8.131.52
www.domain.com IN CNAME someotherdomain.com
The reason they are wrong is domain.com www.domain.com and someotherdomain.com should all have periods at the end like this:
domain.com. IN A 184.108.40.206
www.domain.com. IN CNAME someotherdomain.com.
Another rule to keep in mind is that a sub domain that is not fully qualified does not need a trailing period. For example:
www IN CNAME someotherdomain.com.
That is correct. The reason for the period is this. If you do not include a period, then the name server will automatically append .domain.com to the end of the entry. so domain.com becomes domain.com.domain.com. This is why www without a period works, because www becomes www.domain.com.
For TXT records, it’s fairly simple. Put the value in ” ” (double quotation marks).
This entry is wrong:
domain.com. 3600 IN TXT MS=ms12345678
This entry is correct:
domain.com. 3600 IN TXT “MS=ms12345678”