Fireship · @fireship
DNS Explained in 100 Seconds
Uploaded July 6, 2021 · Length 2:16
Summary
dns explained in 100 seconds, how dns works, dns query process, dns records, a records, cname records, mx records, ns records.
- dns explained
- dns query
- dns records
- a records
- cname records
- mx records
- ns records
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
the domain name system or dns is like
- 0:02
the phone book of the internet it maps
- 0:04
human readable urls or host names like
- 0:09
www.fireship.io
- 0:10
to the ip address of the server that
- 0:12
hosts that site when you type a url into
- 0:14
the browser
- 0:15
it makes a dns query to figure out which
- 0:18
unique ip address
- 0:19
is associated with that hostname first
- 0:21
it'll attempt to look in the local
- 0:22
browser or operating system cache
- 0:25
but if the cache is empty then we need
- 0:26
to look up the ip address in the phone
- 0:28
book which is the job of a server
- 0:30
known as the dns recursive resolver it's
- 0:33
recursive
- 0:33
because it needs to make multiple
- 0:35
requests to other servers starting with
- 0:37
the root name server which itself will
- 0:39
respond with the address of a top level
- 0:41
domain dns server which stores data
- 0:43
about top level domains like
- 0:45
com or dot io the resolver makes a
- 0:47
request there which will respond with
- 0:49
the ip address of the authoritative name
- 0:51
server
- 0:52
that's the final source of truth that
- 0:53
contains the requested website's ip
- 0:55
address that gets sent back down to the
- 0:57
client
- 0:58
and is cached for future use that sounds
- 1:00
complicated but it all happens within a
- 1:02
fraction of a second
- 1:03
you can think of it as a globally
- 1:04
distributed database that handles more
- 1:06
requests than any other database in the
- 1:08
world
- 1:08
when you register a domain name it's
- 1:10
handled by a registrar
- 1:12
accredited by the non-profit
- 1:13
organization icann the record is then
- 1:15
maintained by a registry operator who
- 1:18
stores your dns settings and propagates
- 1:20
them to
- 1:20
other dns servers around the world as
- 1:22
the registrant you'll be assigned a zone
- 1:24
file where you can configure
- 1:26
the settings of your domain every zone
- 1:28
has a startup authority record
- 1:29
to tell other dns servers who's in
- 1:31
charge of that domain
- 1:32
but most importantly we have the a
- 1:34
record it means address
- 1:36
and maps a domain or subdomain to the ip
- 1:38
address of its host
- 1:39
in other cases though we may want to
- 1:41
forward a domain to another domain on
- 1:43
the internet
- 1:44
instead of an ip address in which case a
- 1:46
canonical name or cname record would be
- 1:48
used
- 1:49
we have mx records for email and we can
- 1:51
store arbitrary data with text records
- 1:53
which is
- 1:54
often used to communicate with third
- 1:55
parties to verify ownership of the
- 1:57
domain and finally we have the ns or


