DNS, the Domain Name System, is the internet's lookup service that turns a name such as a shop's web address into the numeric address of the server that holds the website. Computers on the internet find each other by numbers called IP addresses, such as 203.0.113.25. People remember names. DNS connects the two, every time anyone opens a website, sends an email or uses an app.
Here is how it works in general. You type a web address into a browser. Your device first asks a resolver, a lookup server usually run by your internet provider. If the resolver has looked up the same name recently, it answers from its own memory at once. If not, it asks in steps. It first asks a root server which servers handle names ending in ".in". It then asks those servers which server is responsible for this particular name. That server is called the authoritative name server, and it holds the name's records. It replies with the IP address. The resolver passes the address to your browser, which connects to the website's server. The whole lookup usually takes a few milliseconds to a few tenths of a second.
The records are short lines kept by the name's owner. An A record gives the IP address of a website. An MX record says which server receives the name's email. Each record also has a time to live (TTL), for example 3,600 seconds, which tells resolvers how long they may keep the answer before asking again. This keeping of answers is a kind of caching, and it is why DNS is fast.
Take, for example, a chartered accountant's firm in Thrissur that moves its website to a new web host. It changes its A record to the new server's address, and visitors reach the new server once the old answers expire from the resolvers' memory.
Consider a law firm that uses an email service for its staff. The firm's MX record points to that service's mail servers, so that a client's message to any address at the firm reaches the right place.
Say a news website uses a content delivery network (CDN). Its DNS answer differs by place, so a reader in Shillong is sent to a nearby server, not to one in another country.
Because every visit begins with DNS, attackers target it too. They may flood a name server with millions of requests, which DDoS protection filters out, or try to send visitors to a false address. The website's certificate lets the browser detect a false server.
How is DNS different from domain registration? Registration is buying the right to use a name, from a company called a registrar, for a yearly fee. DNS is the lookup that, every time, turns that registered name into the address of a server.
Appears in
- Domain registration and DNS↗ Cloud hostingA registrar sells the domain name, and its DNS service holds the name's records, such as the IP address of the website's server and the server that receives its email.
- Web hosting↗ Cloud hostingA web host gives the customer the IP address of the server that holds the website, and the customer's DNS record points the domain name to that address.
- Content delivery network (CDN)↗ Cloud hostingA content delivery network answers DNS lookups for a website with the address of one of its own servers near the visitor, so the page is sent from that nearby server.