DNS basics for beginners start with a simple problem: people remember names more easily than numeric network addresses. When you type a website name into a browser, DNS helps discover the address and other information needed to reach the correct service.
What is DNS?
The Domain Name System is a distributed naming system for the internet. It stores records that connect domain names to network information. A browser uses DNS results as one step in loading a website, alongside other tasks such as establishing a connection and requesting the page.
DNS is sometimes compared with a phone book. The comparison is useful because a name can be looked up to find an address, but DNS is a hierarchical and distributed system rather than one central list.
Domain names and IP addresses
A domain name is the readable name used for an internet service, such as example.com. An IP address identifies a network endpoint. IPv4 addresses look like four numbers separated by dots; IPv6 addresses use groups of hexadecimal characters separated by colons.
The website's domain name and the address of its hosting server are not the same thing. A domain can point to different services, and a service can use multiple addresses. DNS records let domain owners publish the information that resolvers need.
How a DNS lookup works
- Browser checks available information. The browser or operating system may already have a cached DNS answer.
- A resolver receives the query. If the answer is not cached, a recursive resolver works to find it.
- Root and top-level domain servers guide the lookup. The DNS hierarchy directs the resolver toward the authoritative servers for the domain.
- Authoritative name servers answer. They provide the published record for the requested name and type.
- The resolver returns the answer. The result may be cached for the record's time to live (TTL).
Real networks can use cached answers, forwarding resolvers and provider-specific infrastructure, so not every lookup follows the same visible sequence. The key idea is that a recursive resolver obtains an answer on behalf of the device, while authoritative servers publish the data for a domain.
Common DNS record types
| Record | What it is used for | Simple example |
|---|---|---|
| A | Maps a name to an IPv4 address | www.example.com → 192.0.2.10 |
| AAAA | Maps a name to an IPv6 address | www.example.com → 2001:db8::10 |
| CNAME | Points one name to another canonical name | shop.example.com → stores.example.net |
| MX | Identifies mail servers for a domain | Mail provider hostnames with priorities |
| TXT | Publishes text data used by different services | Domain verification or email-authentication text |
| NS | Identifies authoritative name servers | Name server hostnames for a zone |
These examples use documentation-style addresses and names. They are illustrations, not live records to copy into a real domain. A record's actual value must come from the provider or service that operates the domain.
What is TTL and DNS caching?
TTL means time to live. It tells a resolver how long a DNS answer may be cached before it should be refreshed. A longer TTL can reduce repeated lookups, while a shorter TTL can make planned record changes easier to roll out. Changes may still take time to appear consistently because different resolvers cache data.
Safe DNS practice for beginners
- Use a read-only lookup first when learning about a domain.
- Do not change a live domain's A, MX, NS or TXT records without approval.
- Keep a copy of the existing DNS zone or change record before editing it.
- Understand what service uses a record before deleting it.
- Use test domains or a private lab when practising changes.
DNS mistakes can affect a website, email delivery, service verification and security. A record that looks old may still be required by a mail provider or application. When you manage a real domain, confirm the intended result with its owner and service documentation before publishing changes.
Practice task: follow one DNS answer
Choose a public website that you are allowed to research. Use a read-only DNS lookup tool or a terminal command such as nslookup example.com or Resolve-DnsName example.com in PowerShell. Write down the record type and answer. Do not use commands that edit a domain's records.
Frequently asked questions
Why does the internet need DNS?
DNS lets people use readable domain names instead of memorising IP addresses. It also provides a distributed way to publish different kinds of service information, such as web addresses and mail servers. Devices and applications ask resolvers for the records they need.
What is the difference between a DNS resolver and an authoritative name server?
A recursive resolver receives a query from a device and obtains the requested answer, often using cached information. An authoritative name server publishes the records for a domain or zone. The resolver asks the authoritative system when it needs an answer that is not already cached.
Does changing a DNS record take effect immediately?
Not always. Resolvers may keep earlier answers in their caches until the record's TTL expires, and provider systems may update at different times. Plan changes carefully, check the published result from more than one resolver and keep a rollback record for important services.
What does an A record do?
An A record maps a domain name to an IPv4 address. It is commonly used when a website or service needs a name to resolve to an IPv4 endpoint. IPv6 addresses use AAAA records, and the correct values must come from the service provider.
Can DNS records affect email?
Yes. MX records help direct incoming mail, while TXT records can publish information used for domain verification and email authentication. Incorrect DNS changes may interrupt mail delivery or authentication, so confirm mail-provider instructions before changing records and keep a copy of existing settings.
Key takeaway
DNS is the naming system that helps devices find services by domain name. Learn the roles of resolvers and authoritative servers, recognise common record types and practise with read-only lookups. Treat real DNS changes carefully because one incorrect record can affect several business services.