07Domains, DNS & SSL
DNS basics – nameservers, records and TTL explained
What DNS is and how a domain name becomes the address of your server – nameservers, A, CNAME, MX and TXT records and TTL explained clearly by Nexthosting.
In short
DNS is the phone book of the internet. It translates a name like meinprojekt.de into the numeric address (IP address) of the server your website or game server runs on. The records for this live in a zone on your nameservers. Changes take some time to become visible everywhere.
What is DNS for?
Section titled “What is DNS for?”Computers find each other through IP addresses such as 203.0.113.10 (IPv4) or 2001:db8::10 (IPv6). Nobody can remember those. So DNS (Domain Name System) maintains a mapping from name to address. DNS also tells the world where emails for your domain should go.
The key terms
Section titled “The key terms”| Term | Meaning |
|---|---|
| Domain | Your name, e.g. meinprojekt.de. |
| Subdomain | A prefix before the domain, e.g. www.meinprojekt.de or mc.meinprojekt.de. |
| Registrar | The company where the domain is registered and managed. |
| Nameserver | Servers that deliver the DNS records of your domain. The registrar determines which nameservers apply to your domain. |
| Zone | The collection of all DNS records of a domain. |
| Record | One line in the zone, e.g. “www points to this address”. |
| Resolver | The DNS server of your internet provider (or e.g. 1.1.1.1) that asks on your behalf and remembers the answers. |
| TTL | “Time to Live”: how many seconds a resolver may store an answer. |
How a name is resolved
Section titled “How a name is resolved”- Browser asks the resolverWhere is meinprojekt.de?
- Resolver asks the root and the .de endingWho manages the domain?
- The responsible nameservers answerThey know the zone of your domain
- Resolver remembers the answerFor as long as the TTL allows
- Browser connects to the IP addressThe site or server responds
What matters here: the registrar decides which nameservers are responsible. The records themselves live on those nameservers. So if you want to change something, you first need to know where your nameservers are.
You can see the currently valid nameservers with nslookup -type=NS meinprojekt.de or in the registrar’s domain management. If they are ns1.nexthosting.net and ns2.nexthosting.net, you manage the records at Nexthosting.
Record types
Section titled “Record types”| Type | Purpose | Example |
|---|---|---|
| A | Name points to an IPv4 address | meinprojekt.de → 203.0.113.10 |
| AAAA | Name points to an IPv6 address | meinprojekt.de → 2001:db8::10 |
| CNAME | Name is an alias for another name | www → meinprojekt.de |
| MX | Where emails for the domain go (with priority) | 10 → mail.meinprojekt.de |
| TXT | Free text: SPF, DKIM, DMARC, verification codes | v=spf1 … |
| NS | Which nameservers are responsible | at Nexthosting ns1.nexthosting.net and ns2.nexthosting.net |
| SRV | Service, port and target, e.g. for Minecraft | _minecraft._tcp |
| CAA | Which parties may issue certificates | optional |
The IP addresses in the table are documentation examples, not real Nexthosting addresses. Your real address is shown by the web panel for your website, or by the panel for your game server.
Two rules that often cause trouble
Section titled “Two rules that often cause trouble”- A CNAME must not stand alone next to other records for the same name. On the main domain (
meinprojekt.dewithoutwww) you therefore need an A or AAAA record, because MX and TXT records live there too. - An MX record points to a name, never to an IP address, and that name must not be a CNAME.
TTL and waiting time
Section titled “TTL and waiting time”Every answer has a TTL. While it runs, resolvers do not ask again. That is why some visitors see a change immediately and others only after hours.
- Minute 0You save the new recordFrom now on the nameservers deliver the new answer
- Minutes 0–60Mixed phaseResolvers that stored the old answer still deliver the old one
- After 1 hourMost resolvers have asked again
- Up to 24–48 hoursEven slow networks are up to dateWith nameserver changes it can take this long
If you change the nameservers of a domain, it takes longer, because the registry for the ending (e.g. for .de) first has to record the new responsibility and resolvers have to learn it. Allow up to 48 hours, even though it is usually faster.
Subdomains
Section titled “Subdomains”With subdomains you divide a domain: www for the website, shop for a shop, mc for a Minecraft server. Each subdomain gets its own records and can point to a different server. How to point a subdomain to a game server is explained in Connect a domain to your game server.
Frequently asked questions
Section titled “Frequently asked questions”Do I have to change the nameservers to run a website at Nexthosting?
Section titled “Do I have to change the nameservers to run a website at Nexthosting?”No. You can change the nameservers, or leave the domain at your old provider and set only A or AAAA records there. Both routes are described in Connect a domain to your website.
Why do I see the new page, but my friend still sees the old one?
Section titled “Why do I see the new page, but my friend still sees the old one?”Resolvers refresh at different speeds. This is normal – see the timeline above and Solving DNS problems.
What is the difference between DNS cache and browser cache?
Section titled “What is the difference between DNS cache and browser cache?”The DNS cache remembers addresses, the browser cache remembers page content. Both can show outdated versions. More in Understanding caching.