What DNS records do you set up for company email?
BeginnerScenarioDNS & Service Discovery
Answer
Situation read → MX plus the three email authentication records.
What I'd do →
- Add MX records pointing to the mail provider with priorities
- Add an SPF TXT:
v=spf1 include:_spf.google.com ~all - Add DKIM as a TXT or CNAME record at
selector._domainkey.example.com - Add DMARC:
_dmarc TXT "v=DMARC1; p=quarantine; rua=mailto:[email protected]" - Check with
dig TXT example.com +shortanddig MX example.com +short
Why → SPF, DKIM and DMARC together keep your mail out of spam and stop spoofing of your domain.
Interview tip → Say DMARC should start at p=none with reporting, then move to quarantine and reject.
More on DNS & Service Discovery
A customer types www.example.com in a browser. Walk through how DNS resolves it.BeginnerWhat is the difference between an A record and a CNAME, and when do you use each?BeginnerWhy can't you put a CNAME at the zone apex, and what do you use instead?BeginnerYou are moving a site to a new server. What do you do with DNS to make the cutover smooth?BeginnerHow do you find which nameservers are authoritative for a domain and query them directly?BeginnerWhen do you use /etc/hosts and when DNS?Beginner