What Is DNS?
DNS is the system that connects human-readable domain names to the servers and services behind them. Without DNS, using the web would usually require remembering numerical network addresses instead of names such as freelancecoder.uk.
DNS means Domain Name System
DNS, or the Domain Name System, is a distributed system used to translate domain names into information that computers can use to locate internet services.
Domain name to server
People prefer names. Computers ultimately need network addresses and routing information.
When you enter a domain into a browser, DNS helps determine where the request should be sent.
A simple DNS lookup
Imagine that a browser needs to open:
The browser needs to determine which server or service is responsible for that hostname.
Once the destination has been found, the browser can begin communicating with the appropriate server.
Domain, DNS and hosting are different
Domain
The human-readable name, such as example.com.
DNS
The system that tells computers where services associated with that name can be found.
Hosting
The server or platform that stores and serves the website or application.
Website
The actual pages, files and application content that visitors interact with.
Common DNS record types
DNS stores different kinds of information in DNS records.
Pointing a domain to an IPv4 address
An A record maps a hostname directly to an IPv4 address.
The exact IP address will depend on the server or hosting platform being used.
Pointing one hostname to another
A CNAME record creates an alias between hostnames.
The DNS system can then continue resolving the destination hostname.
DNS also controls email routing
DNS is not only used for websites.
MX records tell other mail systems which servers should receive email for a domain.
This is why changing website hosting does not necessarily mean changing email hosting.
What are nameservers?
Nameservers are DNS servers responsible for providing information about domains and DNS zones.
A domain registrar may allow you to select which nameservers are authoritative for your domain.
Those authoritative servers contain or serve the DNS records that describe where the domain's services should go.
DNS is hierarchical
Domain names are organised into levels.
At the very top of DNS is the DNS root.
How DNS resolution works
A DNS lookup can involve several different systems.
A recursive resolver performs or coordinates the lookup required to obtain the answer for the client.
DNS answers can be cached
DNS systems often cache previous answers so that every lookup does not have to repeat the full resolution process.
This improves speed and reduces unnecessary DNS traffic.
What is TTL?
DNS records commonly include a value called TTL, meaning Time To Live.
TTL tells DNS caches approximately how long a record may be retained before it should be refreshed.
A DNS change may therefore not appear everywhere immediately because some systems may still have an older answer cached.
What does DNS propagation mean?
When people say that DNS is propagating, they usually mean that different DNS resolvers and caches are gradually replacing previously cached information with newer records.
The term "propagation" is convenient, although much of the delay is actually caused by caching and TTL behaviour.
DNS does not resolve an entire URL
Consider:
DNS is primarily concerned with the hostname:
The rest of the URL is handled by the web request and the server or application.
DNS and IP addresses
DNS and IP addresses solve different parts of the problem.
| Concept | Purpose |
|---|---|
| Domain name | Human-readable name. |
| DNS | Resolves names and provides service information. |
| IP address | Network address used for routing traffic. |
| Server | Handles requests and provides a service. |
When would you edit DNS?
You may need to change DNS records when:
Connecting a website
Pointing a domain to Blogger, WordPress, a hosting company or another web platform.
Configuring email
Adding MX and other email-related records.
Verifying ownership
Adding a TXT or CNAME record to prove control of a domain.
Creating subdomains
Connecting names such as blog.example.com or api.example.com to services.
A useful way to remember DNS
DNS acts as the connection between the name people type and the internet service that should receive the request.
Names need directions.
DNS stands for Domain Name System. It connects domain names with the servers and services behind them using records such as A, AAAA, CNAME, MX, TXT and NS. DNS is separate from the domain itself, the hosting platform and the website content, but it is the system that connects those pieces together.