NewThe ManyPI MCP Server is now live

How DNS turns names into addresses

What happens between typing a domain and reaching a server, with the six record types worth knowing and an exercise to finish.

Guide30 minBachelor +2CC BY 4.0

What you will learn

  • Describe a DNS lookup step by step
  • Name what A, AAAA, CNAME, MX, TXT and NS records hold
  • Look up records for a real domain

Computers find each other by numbers. People prefer names. DNS, the Domain Name System, translates between the two, millions of times a second, without anyone noticing.

Put in order

One lookup, step by step

  1. 1Those servers answer with the address
  2. 2The computer asks its resolver, usually run by your internet provider
  3. 3The resolver asks a root server who handles .com
  4. 4The .com servers name the servers responsible for example.com
  5. 5The browser connects to that address
  6. 6You type example.com and press Enter

The records worth knowing

Record

What it holds

Example value

A

An IPv4 address

203.0.113.10

AAAA

An IPv6 address

2001:db8::10

CNAME

Another name this one is an alias for

shop.example.net

MX

The servers that receive email

10 mail.example.com

TXT

Text, such as SPF rules or ownership proofs

v=spf1 include:... ~all

NS

The servers responsible for the domain

ns1.example.com

Look it up yourself

On most computers, a terminal can ask DNS directly.

Ask for the mail servers of a domain
nslookup -type=MX example.com

Or use the Mailbox Provider Checker, which looks up the MX records and names the provider behind them.

Resolvers remember answers for a while (the record's TTL, time to live), which is why a changed record can take hours to reach everyone.

Check what you know with the DNS record types exercise.

Reuse this material

CC BY 4.0

You may copy, adapt and share it, also commercially, as long as you credit ManyPI and link back.

"How DNS turns names into addresses" by ManyPI (https://manypi.com/edu/dns-explained), licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)