How DNS works

Computers on the internet find each other by numbers, known as IP addresses. People, however, remember names better. When you type a website address into your browser, the browser first asks a DNS server which IP address this domain has. Only then does it connect to the right server.

Each domain has what are called DNS records. The most common ones are:

  • A record – the IP address the website runs on.
  • CNAME – a pointer from one name to another, for example for www.
  • MX record – where emails should be delivered.
  • TXT record – verifications for Google or Microsoft and anti-spam settings (SPF, DKIM, DMARC).

Why it matters

DNS goes unnoticed as long as it works. But one wrong record can take down your website or email. Incorrectly set SPF or DKIM, on the other hand, means your quotes and invoices end up in customers' spam folders.

A real-world example

An accounting firm in Nitra was moving its website to new hosting. While changing the DNS, someone overwrote the MX record as well, so no emails arrived for two days. Nobody noticed until a client called to ask why they were not replying to his messages. When moving a website, you need to transfer all the records, not just the one for the website. That is why, during a website migration, I back up the DNS records first and check email delivery after the change.

Common mistakes and tips

  • Changes do not take effect immediately. A new value can take anywhere from a few minutes to several hours to spread across the internet.
  • Save the original records before making changes so you have something to go back to.
  • Make sure you have access to DNS management, not just your former supplier.
  • Set up SPF, DKIM and DMARC if you send emails from your own domain.