sellhosting.biz

Guides · Updated 2026-10-31

DNS Basics: How Domain Names Find Your Website

DNS, the Domain Name System, is the internet's address book. Computers find each other by IP addresses such as 203.0.113.10 or long IPv6 addresses. People prefer names like example.com. DNS translates names into the information computers need, and it does this billions of times a day so quickly that most people never notice it exists.

If you run a website, you will eventually need to change a DNS record: to point your domain at a new host, to set up email, or to prove to a service that you own the domain. Knowing the basics turns a scary settings page into a short checklist.

What happens when someone visits your site

When a visitor types your domain into a browser, their device asks a resolver, usually run by their internet provider or a public service, for the address. If the resolver does not already have the answer saved, it works its way down the hierarchy: it asks the root servers who handles .com, then asks the .com servers who handles example.com, and finally asks your domain's authoritative nameservers for the actual record. The answer comes back, the resolver saves it for a while, and the browser connects to the server at that address.

The important part for you is the last step. Whoever runs your authoritative nameservers controls your DNS. That might be your registrar, your host, or a DNS provider like Cloudflare.

Nameservers vs records

These two things cause most of the confusion.

If you edit records at a company that is not your current nameserver provider, nothing will happen, because the internet is not asking that company. When a change seems to do nothing, check this first.

The record types you will meet

TTL and "propagation"

Every record has a TTL (time to live), measured in seconds. It tells resolvers how long they may keep a cached copy. With a TTL of 3600, a resolver may keep giving out the old answer for up to an hour after you change it.

This is what people mean by "DNS propagation". Nothing is being pushed around the world; caches are simply expiring at different times. Nameserver changes at the registrar can take longer, often up to a day or two, because the TLD's own records have long TTLs.

A good habit before a planned move: lower the TTL on the records you will change to something like 300 seconds a day ahead. When you switch, caches clear within minutes. Raise it again afterward.

Email records deserve extra care

Website records and email records are independent. You can move your website to a new host and keep email exactly where it is, as long as you leave the MX and email-related TXT records alone. A common mistake during a move is changing nameservers to a new provider that has not copied the old MX records, which quietly breaks email. Before switching nameservers, copy every existing record to the new provider and compare them line by line.

For email to land in inboxes rather than spam folders, you will usually want:

How to check your DNS

You do not need special software. On a Mac or Linux computer, the dig command shows records, for example dig example.com A or dig example.com MX. On Windows, nslookup does a similar job. Web-based DNS lookup tools let you see what public resolvers return from several places at once, which helps when you are waiting on a change.

Troubleshooting checklist

The short version

DNS turns names into addresses. Nameservers decide who answers for your domain; records hold the answers. A and CNAME records point your website, MX records route email, and TXT records prove ownership and protect mail. Copy everything before you switch providers, lower TTLs before planned changes, and most DNS problems become easy to fix. Next, read SSL certificates explained or how to move a website to a new host.