What is DNS?
DNS is the phone book of the internet: it turns a name you can remember into the IP address a computer needs.
Why DNS exists
Computers find each other by IP address, but people remember names. The Domain Name System joins the two. When you type a website's name, your device first asks a DNS server "what is the address for this name?", gets a number back, and only then connects to the website. It happens in a few thousandths of a second, before every first visit to a site.
What happens in a look-up
- Your device checks its own memory (cache). If it asked recently, it already knows the answer.
- If not, it asks the DNS resolver it has been told to use. By default that is your internet provider's, and your router passes its address to every device.
- The resolver finds the answer by asking, in turn, a root server (which knows who handles
.com,.inand so on), the server for that ending, and finally the server that holds the records for the name itself. - The resolver sends the address back and remembers it for a while, as long as the record's "time to live" allows.
Kinds of records
| Record | What it holds |
|---|---|
| A | The IPv4 address for a name |
| AAAA | The IPv6 address for a name |
| CNAME | "This name is another name for that one" |
| MX | Which server receives email for the domain |
| TXT | Free text, used to prove ownership and to fight forged email |
| NS | Which servers hold the records for the domain |
When DNS goes wrong
DNS trouble looks like "the internet is down" although the line is fine. Signs: apps that are already connected (a call, a chat) keep working while new websites will not open, or the browser says the site's address could not be found.
Things to try, easiest first:
- Restart the router. It often is the DNS go-between for the house.
- Clear the device's DNS memory. On Windows, open Command Prompt and run:
ipconfig /flushdns
- Switch flight mode on and off on a phone.
- Try another DNS resolver (next section).
Changing your DNS resolver
You are free to use a public resolver instead of your provider's. Well-known ones are run by Google (8.8.8.8 and 8.8.4.4), Cloudflare (1.1.1.1 and 1.0.0.1) and Quad9 (9.9.9.9). Reasons people switch: the provider's resolver is slow or failing, or they want the filtering of harmful sites that some resolvers offer.
Set it in one place:
- In the router (DNS fields on the WAN or DHCP page): every device in the house then uses it.
- On one device: in the Wi-Fi network's settings, where the IP address is shown. On Android 9 and later there is also Private DNS in the network settings, which takes a resolver's host name and encrypts the look-ups.
Privacy and DNS
Ordinary DNS look-ups are not encrypted. Whoever runs the resolver, and the network in between, can see which site names you look up (not the pages you read). DNS over HTTPS and DNS over TLS encrypt the question between you and the resolver. Modern browsers and phones support them; in browsers the setting is usually called "secure DNS". It hides the look-ups from the network you are on, though the resolver you chose still sees them.
Does changing DNS make the internet faster?
It can make the first connection to each site a little quicker if your provider's resolver is slow. It does not change download speed.
Does changing DNS hide my IP address?
No. Websites still see your address. DNS only answers the question "where is this name?".
What does "DNS server not responding" mean?
Your device asked for a name and got no answer. Restart the router first. If only one device is affected, clear its DNS memory or set a public resolver on it.