TutorChase logo
Login
AQA A-Level Computer Science

18.3.6 DNS and Domain Name Structure

The Domain Name System (DNS) is a core part of how the internet functions, converting easy-to-remember domain names into numerical IP addresses that computers use to locate each other.

Domain name organisation

Understanding domain names

A domain name is a human-readable address used to identify a location on the internet. Rather than remembering a series of numbers (an IP address), users simply enter a name like www.bbc.co.uk into their web browser. This name is then translated into the IP address of the server that hosts the website.

Domain names are structured hierarchically and are read from right to left, starting with the highest level (the top-level domain) and moving left through subdomains. The parts of a domain are separated by full stops (dots). This structure enables efficient organisation, delegation, and management across the vast network of the internet.

Components of a domain name

Each domain name can be broken down into several distinct components:

  • Top-level domain (TLD): This is the part furthest to the right, such as .com, .org, .uk. It is the highest level of the domain name structure.

  • Second-level domain (SLD): This sits immediately to the left of the TLD. For example, in example.com, example is the second-level domain.

Take your grades to the next level!

UPGRADING TO PREMIUM UNLOCKS
AI Tutor
AI-powered study assistant
instant feedback and guidance
Predicted Papers
Examiner-style predicted papers
based on recent exam trends
Practice Questions
All exam practice questions
by topic for each subject
Study Notes
All detailed revision notes
written by expert teachers
Cheat Sheets
Quick revision summaries
perfect for last-minute review
Past Papers
Complete collection
of practice and past exam papers
Email
Password
Confirm Password
Already have an account?

Practice Questions

FAQ

The Domain Name System (DNS) is designed to be highly fault-tolerant and resilient. If a DNS server becomes unavailable, queries can still be resolved using backup servers due to DNS’s distributed nature. Most DNS zones have multiple authoritative name servers specified using NS records, providing redundancy. Recursive resolvers can try alternate name servers listed in these records. Additionally, DNS responses are cached at multiple levels—browser, operating system, and resolver—so recent queries can still be answered without contacting external servers. This caching includes a Time To Live (TTL) value, allowing data to remain valid for a specified period even if the original server is down. Also, root servers and TLD servers are replicated globally using anycast, allowing requests to be routed to the nearest operational server. Together, these features ensure DNS remains operational and reliable even if parts of the system temporarily fail or become unreachable.

Public DNS services such as Google DNS (8.8.8.8) and Cloudflare DNS (1.1.1.1) can significantly improve internet performance and security. They often offer faster query resolution than ISP-provided resolvers due to better infrastructure, global server distribution, and aggressive caching. These services also implement features like DNS over HTTPS (DoH) or DNS over TLS (DoT), which encrypt DNS queries and enhance user privacy by preventing eavesdropping or tampering by third parties. Additionally, public DNS providers may have more robust defences against DNS-based attacks like spoofing or cache poisoning. However, using a public DNS service involves trusting that provider with your DNS query data. Some providers, like Cloudflare, have strict privacy policies and commit to not storing user data, whereas others may log or analyse data for different purposes. Overall, using a reputable public DNS service can improve performance and privacy but depends on the provider’s policies and user preference.

Yes, a domain name can point to multiple IP addresses using multiple A records (for IPv4) or AAAA records (for IPv6) in its DNS configuration. This approach is often used for load balancing, where requests are distributed among multiple servers to manage high traffic and improve responsiveness. It can also be used for redundancy and failover, ensuring that if one server goes down, other servers are available to handle requests, thus maintaining service availability. This setup is especially common in large-scale web applications and content delivery networks (CDNs), where global distribution of servers is necessary for performance. The DNS resolver will typically choose one IP address to return, often based on a round-robin or geographically-optimised method. By configuring a domain with multiple IP addresses, organisations can build robust, fault-tolerant systems that scale well and provide a consistent user experience, regardless of where the user is located or whether a specific server is experiencing issues.

A reverse DNS lookup performs the opposite task of a typical DNS query. Instead of resolving a domain name into an IP address, it starts with an IP address and returns the associated domain name. This is often used for security auditing, email verification, and network diagnostics. For example, email servers use reverse DNS to verify that the sending IP matches the domain name in the email header, helping to filter out spam or spoofed emails. The reverse lookup process uses special domains called in-addr.arpa for IPv4 and ip6.arpa for IPv6. These domains are structured to match the IP address in reverse order and point to a PTR (Pointer) record, which maps the address back to the domain name. Unlike regular A or AAAA records, which are set by domain owners, PTR records must be configured by whoever controls the IP address block—usually the ISP or hosting provider.

A CNAME (Canonical Name) record is used in DNS to create an alias from one domain name to another, whereas an A record maps a domain name directly to an IP address. CNAME records are useful when multiple domain names need to point to the same resource but you want to maintain only one target IP address. For example, you might have shop.example.com as a CNAME for store.example.com, and store.example.com would have an A record pointing to the actual IP. This means that if the server’s IP changes, you only need to update the A record for store.example.com, and shop.example.com will automatically reflect the change. CNAMEs simplify management and reduce errors in large systems. However, CNAME records should not be used at the root domain level (e.g. for example.com) because some DNS providers do not allow it, and it can cause issues with protocols expecting A records at the apex of a domain.

Hire a tutor

Please fill out the form and we'll find a tutor for you.

1/2
Your details
Alternatively contact us via
WhatsApp, Phone Call, or Email