DNS (Domain Name System)
DNS is the internet's address book: it turns a name like example.com into the numeric IP address a computer needs before it can open a connection — and it quietly reveals every site you visit while doing so.
Definition
The Domain Name System (DNS) converts a name a person can remember, such as proxyhorizon.com, into the numeric IP address a computer actually needs to open a connection. Nothing you do online happens without it happening first.
The order of events is worth being precise about. Your browser does not "visit a domain". It asks DNS for an address, receives one, then connects to that address. The domain name is a label; the IP is the destination.
What happens during a lookup
- Recursive resolver — usually run by your ISP, or a public service you have chosen. It does the legwork on your behalf.
- Root servers — they do not know the answer, but they know which servers handle
.com. - TLD servers — these know which nameservers are authoritative for the domain.
- Authoritative nameserver — the final word, holding the actual records.
In practice most of these steps are skipped, because every answer carries a TTL telling everyone how long they may cache it. That is why a DNS change reaches one visitor in minutes and another in hours: they are holding cached answers of different ages.
The records you will actually meet
- A — maps a name to an IPv4 address.
- AAAA — the same for an IPv6 address.
- CNAME — points one name at another, commonly to hand traffic to a CDN.
- MX — where to deliver email for the domain.
- TXT — free-form text, used for domain verification and email authentication.
- NS — which nameservers are authoritative.
Your resolver sees everything
DNS was designed in 1983 without encryption, so a plain lookup travels in clear text and names every domain you request. HTTPS protects the contents of the page, but the lookup that preceded it already announced where you were going.
Encrypted DNS — DoH (over HTTPS) and DoT (over TLS) — hides queries from anyone sitting between you and your resolver. Changing resolver to 1.1.1.1 or 8.8.8.8 moves the log rather than removing it: you are choosing who to trust with your browsing history, not hiding it from everyone.
DNS and proxies: the leak problem
A DNS leak is when your traffic goes through a VPN or proxy but your lookups do not — the tunnel carries your data while your ISP's resolver quietly logs every domain you asked for.
- HTTP proxies generally receive the full hostname and resolve it themselves, which is safe.
- SOCKS5 can go either way. In curl this is the difference between
socks5://, which resolves on your machine and leaks, andsocks5h://, which lets the proxy resolve. One character decides it. - Browsers with their own DoH setting may bypass both, resolving independently of your system and your tunnel.
DNS decides which version of a site you see
Large sites return different addresses depending on where the query appears to come from, steering you to the nearest CDN edge. Good for speed — but a mismatch between your proxy's location and your resolver's location will serve you the wrong region's content, a common and genuinely confusing failure in geo-targeted testing. If your proxy exits in Berlin, your DNS should resolve from Berlin too.
Examples
Resolving example.com to 93.184.216.34 before a single byte of the page is requested
Switching a router from the ISP resolver to 1.1.1.1 or 8.8.8.8
Using socks5h:// instead of socks5:// in curl so the proxy resolves the hostname and nothing leaks
A 300-second TTL meaning a DNS change reaches most visitors within five minutes
A CNAME pointing shop.example.com at a CDN hostname that returns a different IP in every region
Common Use Cases
Frequently Asked Questions
Keep Learning
All termsIPv4
IPv4 is the 32-bit addressing system most of the internet still runs on, giving every device a number like 203.0.113.42. Its roughly 4.3 billion addresses ran out years ago, which is why clean IPv4 is scarce and expensive.
Read definitionVPN
A VPN (Virtual Private Network) encrypts all of your device's internet traffic and routes it through a remote server, hiding your IP and protecting data on untrusted networks.
Read definitionWebRTC Leak
A WebRTC leak exposes your real IP address through the browser's built-in real-time communication feature — even when you are using a VPN or proxy.
Read definitionCDN (Content Delivery Network)
A CDN is a network of servers spread across the globe that stores copies of website content close to users for faster loading. It also protects sites by absorbing traffic spikes and filtering malicious requests.
Read definitionHTTPS
HTTPS is the secure version of HTTP that encrypts data between your browser and a website using SSL/TLS. It prevents eavesdroppers from reading or tampering with the traffic.
Read definitionDNS Leak
A DNS leak happens when your device sends domain lookups outside the VPN tunnel, so your ISP can still see every site you visit even though the traffic itself is encrypted.
Read definition