2.1.11 URLs, Domain Names and DNS
People use readable web addresses, but Internet communication ultimately depends on numerical IP addresses. A Uniform Resource Locator (URL) identifies a particular resource, while the Domain Name System (DNS) helps find the IP address associated with the host named in that URL.
This section follows the complete process from entering a URL to requesting the chosen resource from a web server.
By the end of this section, you should be able to:
- explain how a URL identifies a resource on the World Wide Web;
- identify the main components of a URL;
- distinguish a URL, domain name and IP address;
- explain the hierarchical structure of a domain name;
- describe DNS as a distributed hierarchical naming system;
- explain the roles of recursive, root, top-level-domain and authoritative DNS servers;
- trace the process of resolving a domain name and requesting a web resource;
- explain the purpose and limitations of DNS caching.
How a URL locates a web resource
A URL does more than name a website. It can identify:
- the protocol or scheme to use;
- the host that provides the resource;
- the path to a particular page, file or service;
- optional parameters supplied to the server;
- an optional location within the returned resource.
Original example
https://learn.orchard-labs.org:443/courses/networks/quiz?level=as#question-4
The browser interprets the URL, resolves the host name, connects to the appropriate server and requests the resource named by the path and query.
Common mistake
A URL is not simply another name for a domain. The domain identifies the host; the complete URL can also specify the protocol, path, query and fragment.
Anatomy of a URL
| Component | Example | Purpose |
|---|---|---|
| Scheme | https | States the communication method the browser should use. |
| Host name | learn.orchard-labs.org | Names the host whose address must be found. |
| Port | 443 | Optionally identifies the destination service; standard ports are often omitted. |
| Path | /courses/networks/quiz | Identifies the required resource or application route on the server. |
| Query string | ?level=as | Supplies additional values to the server-side resource. |
| Fragment | #question-4 | Identifies a position or section within the returned resource; it is normally handled by the browser. |
URL component explorer
Scheme: why does it matter?
The scheme tells the browser which rules to use. HTTPS indicates protected HTTP communication, while another scheme may identify a different type of service.
Host: what does DNS resolve?
DNS resolves the host name, such as learn.orchard-labs.org. DNS does not normally resolve the path, query or fragment.
Path: what happens after the connection?
Once the browser has reached the server, it requests the resource indicated by the path. Different paths can lead to different resources on the same host.
Fragment: is it sent to DNS?
No. DNS is concerned with the host name. A fragment is normally used locally by the browser after the resource has been returned.
Exam tip
For a URL question, state both ideas: the host name identifies the server, while the path identifies the required resource on that server.
Domain names and their hierarchy
Domain names are read from the most general part on the right to increasingly specific labels on the left.
Example
learn.orchard-labs.org
| Label | Role in this example |
|---|---|
| org | Top-level domain |
| orchard-labs | Registered second-level domain |
| learn | Subdomain or host label |
Top-level domains include generic forms such as .org, .com and .edu, as well as country-code forms such as .cn, .it and .uk.
Common mistake
The leftmost label is not automatically the top-level domain. The top-level domain is the rightmost label, such as org in this example.
The role of DNS
Routers need IP addresses, not human-friendly domain names. DNS supplies the link between the two.
Name resolution: the process of finding the required DNS information for a domain name.
What DNS doesβand does not do
| DNS does | DNS does not |
|---|---|
| Find address records for host names. | Download the requested web page. |
| Refer a resolver to other DNS servers. | Choose the page path inside the website. |
| Cache answers for limited periods. | Route every packet across the Internet. |
| Store several kinds of naming records. | Replace the need for IP addressing. |
Common mistake
DNS does not return the whole website. It returns naming information, commonly an IP address, so that the browser can contact the server separately.
How DNS is organised
DNS is distributed so that no single server must store and answer for every domain. Responsibility is divided across levels and administrative areas.
| Component | Role |
|---|---|
| Recursive resolver | Receives a user's query, checks its cache and obtains the answer from other DNS servers when necessary. |
| Root server | Directs the resolver towards the servers responsible for the relevant top-level domain. |
| Top-level-domain server | Directs the resolver towards an authoritative server for the requested domain. |
| Authoritative server | Stores the official records for a domain or DNS zone. |
| DNS zone | An administratively managed portion of the DNS namespace. |
| Secondary authoritative server | Maintains a transferred copy of zone data to improve resilience and availability. |
Why distributed?
- Responsibility can be delegated to the organisations that manage each domain.
- Workload is shared across many servers.
- Replicated authoritative data improve availability.
- Local caching reduces repeated remote queries.
Common mistake
DNS is not one worldwide central database stored on a single root server. Root servers provide referrals into the hierarchy; authoritative servers hold the records for individual zones.
How name resolution works
Suppose the browser needs the IP address for learn.orchard-labs.org.
- The device checks relevant local information, such as its DNS cache.
- If no usable answer is available, the device asks its configured recursive resolver.
- The resolver checks its own cache.
- If necessary, it asks a root server where to find information for .org.
- The root server returns a referral to an appropriate .org server.
- The resolver asks the top-level-domain server where to find the authoritative server for orchard-labs.org.
- The top-level-domain server returns a referral to the authoritative server.
- The resolver asks the authoritative server for the address record of learn.orchard-labs.org.
- The resolver returns the answer to the user's device and may cache it.
- The browser can now connect to the returned IP address.
Referral versus final answer
| Response | Meaning |
|---|---|
| Referral | Points the resolver towards another DNS server that is closer to the required authority. |
| Authoritative answer | Comes from a server responsible for the relevant DNS zone. |
| Cached answer | Comes from previously stored data that remain valid for their configured lifetime. |
Exam tip
Use a clear chain: resolver β root referral β TLD referral β authoritative answer β IP returned.
DNS caching
A resolver does not need to repeat the complete hierarchy lookup for every request. It can temporarily store records it has already received.
Time to live (TTL): the period for which a DNS record may be cached before it should be refreshed.
| Benefit | Limitation |
|---|---|
| Frequently requested names can be resolved more quickly. | A changed record may not be seen until an older cached copy expires. |
| Fewer repeated queries reach root, TLD and authoritative servers. | Incorrect or maliciously altered cache data can direct users to the wrong destination. |
| Network traffic and resolution workload are reduced. | Short TTLs increase query frequency, while long TTLs delay propagation of changes. |
Common mistake
A cached answer is not inherently incorrect. It is valid while its lifetime has not expired, but it may temporarily differ from a recently changed authoritative record.
From URL to returned resource
DNS is one stage of a larger process.
- The user enters a URL.
- The browser separates the scheme, host, port, path, query and fragment.
- The browser obtains an IP address for the host, using DNS when necessary.
- The device sends packets towards that IP address.
- A connection is established with the server and the required protocol is used.
- The browser sends a request containing the path and any query data.
- The server returns the requested web resource or an error response.
- The browser interprets the response and presents the page.
- If a fragment is present, the browser moves to the named section locally.
Common mistake
DNS resolves the host name, not the complete URL. The web server handles the path and query after the browser has connected.
Interactive: DNS Name Resolution Visualiser
Choose one of the three outcomes, then watch how the lookup behaves. The visualiser uses portal.riverview.edu as the example domain.
Practice
Core understanding
- Explain how a URL is used to locate a resource on the World Wide Web.
- Distinguish a URL from a domain name and an IP address.
- Identify the scheme, host, path, query and fragment in:
https://revision.blue-peak.net/tasks/binary?mode=practice#task-6 - Explain why DNS is described as both distributed and hierarchical.
- State the roles of root, TLD and authoritative DNS servers.
- Explain the difference between a referral and an authoritative answer.
- Explain one benefit and one limitation of DNS caching.
Trace the process
A learner enters: https://media.northshore.academy/recordings/networking/week-3
- Which part is sent for DNS resolution?
- Which part identifies the required server resource?
- Describe the DNS lookup if the resolver has no cached answer.
- Explain what the browser does after receiving the IP address.
- Would DNS need to resolve the name again immediately for a second request? Explain.
Spot and correct the misconception
- βDNS downloads the web page and sends it to the browser.β
- βThe top-level domain is always the first word in a domain name.β
- βA URL and an IP address are the same thing.β
- βRoot servers store every website's IP address.β
- βA cached DNS answer is always wrong.β
Review
| Concept | Key idea |
|---|---|
| URL | A structured address identifying how and where to request a resource. |
| Domain name | A readable hierarchical name for a host or domain. |
| DNS | A distributed hierarchical system that resolves names to records such as IP addresses. |
| Recursive resolver | Obtains and returns an answer for the client. |
| Root server | Refers a resolver towards the relevant top-level domain. |
| TLD server | Refers a resolver towards the authoritative server for a domain. |
| Authoritative server | Stores official records for its DNS zone. |
| Cache | Temporarily stores answers to speed later resolution. |
Quick self-check
- Can I break a URL into its main parts?
- Can I explain which part DNS resolves?
- Can I describe the hierarchy without saying that root servers store every address?
- Can I trace a lookup from resolver to authoritative server?
- Can I explain why a cached record may remain temporarily after an authoritative change?
- Can I trace the complete journey from URL to returned web resource?