DNS
DNS for website owners: the whole map
What DNS does, the records you will actually touch, and the order to do things in — with every step linked to a short how-to.
- DNS is the address book that turns your domain name into the server that answers for it.
- You will only ever touch a handful of record types: A, CNAME, NS and MX.
- Change nameservers to move a whole domain; change individual records to point one thing.
- Every DNS change takes time to spread. Minutes to a few hours is normal, not 48.
- Use the checker tools below to see what the rest of the world sees, not just your own machine.
Your domain name is not your website. It is a label that points at the server where your website lives. DNS — the Domain Name System — is the address book that connects the two. When someone types your domain, their computer asks DNS where to go, and DNS answers with an address. Everything on this page is a piece of that one job.
You do not need to understand all of DNS. As a site owner you touch a small corner of it, and you touch it rarely. This page is the map. Each section links to a short how-to for the one task it describes.
The records you will actually use
DNS has many record types. Four of them cover almost everything a normal site owner does.
- A record points a name straight at a numeric server address.
- CNAME points a name at another name, and lets that name’s address answer.
- NS record says which nameservers are in charge of the whole domain.
- MX record says where the domain’s email should be delivered.
The one that trips people up most is the choice between the first two. An A record is for the bare domain; a CNAME is for a subdomain that should follow another host. The full rule, with examples, is in A record vs CNAME. Read that one first if you only read one.
Two ways to point a domain
There are two levels at which you can aim a domain, and mixing them up is the most common mistake.
The first is the whole domain at once. You do this by changing your nameservers so that your host runs all the records for you. This is the simplest path, and it is what most people should do when they move to a new host.
The second is one record at a time. You leave the nameservers where they are and edit individual records — an A record here, a CNAME there. This is what you do when you want your domain and your email in different places, or when you are pointing an existing domain at a new host without handing over everything else.
If you want a second address under a domain you already control — blog. or
shop. in front of it — that is a subdomain, and it is its own small job. See
add a subdomain.
Why nothing changes right away
Every DNS change has to travel. Servers around the world keep a copy of your old answer for a set time, called the TTL, and they will keep handing out the old answer until that time runs out. This is why a change you made can look done on one device and undone on another.
The usual wait is minutes to a few hours. The famous “wait 48 hours” figure is a worst case, and you will rarely hit it. What you should not do is make the same change five times because it has not appeared yet. Make it once, then check.
To check properly, do not trust your own browser. Your machine may still be holding the old answer. Use the DNS propagation checker to see the answer from many places at once, and the DNS lookup tool to read the raw records for a single name. If email is what you are setting up, the email DNS checker reads the MX, SPF and related records together and tells you what is missing.
When DNS is the thing that is broken
If a site will not load at all and the browser says the address could not be found, that is almost always DNS, not the site. The name is pointing at nothing, or at the wrong place. The full walk-through is in DNS_PROBE_FINISHED_NXDOMAIN, which covers both the case where you just made a change and the case where nothing changed and it broke on its own.
The whole setup, in order
If you are setting up a domain from scratch, this is the sequence:
- Decide whether you are moving the whole domain or just one record. Whole domain is simpler.
- If whole domain, change the nameservers to your host and let the host manage the rest.
- If one record, add or edit the single A or CNAME you need.
- Add MX records only if your email lives somewhere separate from your site.
- Wait, then check with the tools above — not with your own browser.
That is the whole map. Each step is a link, and each link is a five-minute job.