Development

DNS (Domain Name System)

The system that translates domain names such as company.com into server IP addresses so the browser knows where to connect

What is DNS (Domain Name System)?

DNS (Domain Name System) is a worldwide distributed database that converts domain names into IP addresses. When you type company.com into a browser, the computer does not know where the website lives. It asks a DNS server, which finds the server's IP address, for example 203.0.113.10, and only then does the browser connect and load the page. That is why DNS is often called the phone book of the internet. It does more than point to the website, though: a domain's DNS records also say where email is delivered, who may send mail on behalf of the domain and how services such as Google verify ownership.

Why It Matters

Without working DNS, neither the website nor company email works, even if the server itself runs perfectly. Most outages during a website migration, a hosting change or an email setup are not caused by the server but by a misconfigured or forgotten DNS record. DNS records also decide email deliverability (SPF, DKIM, DMARC), domain verification in Google tools and who controls the domain. Understanding the basics of DNS saves hours with every change and tells you what to ask your supplier.

Real-World Examples

  • 1A record: company.com points to the IP address of the server that runs the website.
  • 2CNAME record: www.company.com is an alias for company.com, so both addresses lead to the same site.
  • 3MX record: email for @company.com addresses is delivered to Google Workspace or Microsoft 365.
  • 4TXT record: domain verification in Google Search Console, or an SPF rule defining who may send email for the domain.
  • 5Moving to new hosting: after the A record is switched, some computers keep loading the site from the old server for a few hours until the TTL expires.

How DNS works: domain resolution step by step

The whole lookup usually takes a fraction of a second and happens in the background. Simplified, it looks like this:

  1. The browser checks its own cache and the operating system's cache to see whether it already knows the address from a recent visit.
  2. If not, it sends a query to a recursive resolver, which is the DNS server of your internet provider or a public resolver (for example Google 8.8.8.8 or Cloudflare 1.1.1.1).
  3. A resolver without a cached answer asks a root server. The root server does not know the address but knows who runs the domain extension, such as .com or .eu.
  4. The TLD server for that extension replies with the name servers that are authoritative for company.com.
  5. The domain's authoritative name server returns the specific record, for example the IP address from the A record.
  6. The resolver caches the answer for the time set by the TTL and passes it to the browser, which connects to the server.

There are 13 root server identities, labelled A to M and run by 12 independent organisations. According to root-servers.org they are physically spread across more than 1,800 instances worldwide, so an outage in one place goes unnoticed. DNS is older than the web: its core specifications, RFC 1034 and 1035, were published in 1987.

DNS records: the most common types

A domain's configuration is a set of DNS records in what is called a zone. For a business website and email you only need to know these:

  • A: maps the domain to the server's IPv4 address. The most common record for a website.
  • AAAA: the same for an IPv6 address.
  • CNAME: an alias pointing to another domain name (typically www to the main domain, or a subdomain to an external service). The standard does not allow it on the bare domain, because other records must live there.
  • MX: defines the mail servers that receive email for the domain. The priority number says which server comes first.
  • TXT: a text record used for domain verification (Google, Microsoft, Meta) and for email security: SPF, DKIM and DMARC. We explain how these records affect newsletter deliverability in our email marketing guide.
  • NS: states which name servers are authoritative for the domain, i.e. where the DNS records are actually managed.
  • SOA: the technical header of the zone (primary server, serial number, refresh timers).
  • CAA: restricts which certificate authorities may issue an SSL / HTTPS certificate for the domain.

A typical mistake is deleting MX or TXT records when moving a domain to another provider. The website keeps working, but email stops arriving or starts landing in spam.

TTL and DNS propagation: why a change is not instant

Every DNS record has a TTL (time to live), the number of seconds resolvers may remember it. With a TTL of 3600, a resolver may return the old value for an hour after you change the record. This gradual pick-up of changes is called DNS propagation.

Google states that DNS changes usually take effect within 48 hours and occasionally up to 72 hours. It depends on the TTL and the DNS provider. Changing name servers (the NS record at the registry) usually takes longer than editing a single record.

For a planned website move, a simple routine works:

  • A day before, lower the TTL of the affected records, for example to 300 seconds.
  • After the switch, check the website, forms and both sending and receiving email.
  • Once everything is stable, raise the TTL again so resolvers do not query the name servers unnecessarily.

For a detailed migration routine and tips on choosing a provider, see how to choose web hosting and a domain.

DNS server: who manages your domain's DNS

The term DNS server is used for two different things. A recursive resolver answers queries from your computer (set by your internet provider or network administrator). An authoritative name server holds your domain's records and is run by whoever hosts your DNS: the domain registrar, your hosting provider or a separate DNS service such as Cloudflare.

For a business it matters to know where DNS actually lives. The domain may be registered with one company, the name servers may sit with the hosting provider and email with Google or Microsoft. Whoever lacks access to the place where DNS is managed cannot change the website or email, or add verification for advertising platforms. Access should therefore belong to the business, not only to the supplier.

DNS response time is only a small part of page loading. If your site is slow, the server, images and scripts usually matter far more, see website speed optimisation.

DNS security: DNSSEC, DoH and attacks

Classic DNS was designed without security, so answers can be forged. DNSSEC addresses this by digitally signing records, so a resolver can tell that nobody altered the answer on the way. Adoption varies by extension: for the Czech .cz domain, CZ.NIC reports that 883,698 domains, or 59.49% of all .cz domains, were signed with DNSSEC at the end of 2024. Your registrar or DNS provider can usually switch it on with a single setting.

A second layer is query encryption: DNS over HTTPS (DoH) and DNS over TLS (DoT) stop anyone on the network from reading or modifying queries in transit. Modern browsers and operating systems support them.

DNS is also a target for attacks. Flooding name servers is a form of DDoS attack, while forged records or a stolen registrar account can redirect visitors to a fake site, a technique used in phishing. The basics of protection are two-factor sign-in to your registrar and DNS provider accounts and a registrar lock against unauthorised transfers.

How to check DNS records and fix common errors

You can look up a domain's records without special tools:

  • Windows, macOS, Linux: the command nslookup company.com returns the IP address, nslookup -type=MX company.com the mail servers.
  • macOS and Linux: the command dig company.com TXT lists text records, including SPF.
  • Online: DNS checker tools show answers from resolvers in different countries, so you can see where a change has already arrived.

The common Chrome error DNS_PROBE_FINISHED_NXDOMAIN means the resolver could not find the domain. Typical causes are a typo, an expired domain, a missing A record or a stale cache. On Windows, clearing the cache with ipconfig /flushdns or restarting the router often helps.

If you would rather not deal with DNS, hosting and email yourself, we set them up as part of website development or website maintenance, including a record check after every change.

Frequently asked questions

What is DNS in simple terms?

DNS is the phone book of the internet. It converts the domain name people remember (company.com) into the server IP address computers need. Without DNS you would have to type numbers into the browser instead of website names.

What is a DNS server?

A DNS server is a computer that answers queries in the DNS system. A recursive resolver looks up the answer on behalf of your computer, while an authoritative name server holds the records of a specific domain. Resolvers are usually provided by your internet provider; name servers are run by the registrar, hosting provider or a DNS service.

How long does a DNS change take?

A DNS change usually takes effect within a few minutes to 48 hours, occasionally up to 72 hours. The record's TTL and the DNS provider decide. If you lower the TTL to around 300 seconds a day before the change, most users will see the new value within minutes.

What is the difference between a domain and DNS?

A domain is the name you rent from a registrar; DNS is the system that links that name to server addresses and other settings. You can register the domain with one company and manage its DNS records with another, for example your hosting provider.

Which DNS records does a business website and email need?

A business website mainly needs an A (or AAAA) record for the domain and a CNAME or A record for www. Email requires MX records and TXT records with SPF, DKIM and DMARC. More TXT records are added when you verify the domain with Google, Microsoft or advertising platforms.

Related Services

Need help with DNS (Domain Name System)?

Our team can help you integrate this into your project.