TutorChase logo
Login
AQA A-Level Computer Science

18.3.5 URLs and FQDNs

URLs and FQDNs are essential concepts in how we access resources on the Internet, enabling users to navigate to websites using familiar names instead of numeric IP addresses.

What is a URL?

A URL, or Uniform Resource Locator, is a text-based reference used to locate and access resources over the Internet. It acts as an address for a specific resource and tells a browser or client how to fetch it and from where. Whether accessing a web page, downloading a file, or retrieving data from a server, URLs are the standard way to request content from web services.

A URL contains different parts, each with a specific role, and together they allow the user and the system to communicate effectively with web servers. URLs are not limited to web pages—they are also used in APIs, emails, FTP services, and many other internet-based services.

Components of a URL

Each URL is composed of several distinct components. These can be thought of as the different building blocks that make up a complete web address. A full URL might look like:

https://www.example.com:443/folder/page.html?id=42#section3

Let's explore each part in more detail:

1. Protocol

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

URLs follow specific formatting rules defined by the Uniform Resource Identifier (URI) standard. Spaces and certain special characters (like &, ?, /, and #) either have specific meanings within a URL or are not permitted directly. To ensure a URL is transmitted correctly across the Internet, these characters must be replaced with their percent-encoded equivalents. For instance, a space is replaced by %20. This process is known as URL encoding and allows characters that could otherwise interfere with the structure of the URL to be safely included in paths, query strings, or parameter values. Other common encodings include %3A for colon and %2F for forward slash. When the server receives the URL, it decodes these values to interpret the intended characters. Without encoding, URLs could be misinterpreted by web browsers or servers, leading to errors in retrieving the desired resource or executing a command correctly.

Yes, multiple domain names can point to the same IP address, a technique commonly used in shared hosting or for branding purposes. This is achieved by configuring the DNS so that several domain names resolve to a single server IP. For example, example.com, example.co.uk, and example.org might all point to the same website hosted on one server. On the server side, virtual hosting allows it to deliver different content or the same content based on the requested domain. This setup is useful for businesses wanting to protect their brand across multiple domains, for offering multilingual versions of a site (e.g. fr.example.com), or for consolidating web traffic analytics. It also provides flexibility and cost-efficiency, as one server can serve multiple domains without needing separate infrastructure. This approach also supports search engine optimisation strategies and can help prevent phishing attempts on similar-looking domains.

When a user enters a URL in a browser, several steps take place before the web page loads. First, the browser parses the URL to determine the protocol, domain name, and any path or parameters. It checks if the domain’s IP address is cached locally. If not, it sends a DNS query to resolve the domain name into an IP address. Once the IP is known, the browser initiates a connection to the server using the specified protocol, typically HTTPS, which may involve a TLS handshake for secure communication. After the connection is established, the browser sends an HTTP request to the server, requesting the resource indicated in the URL. The server processes the request and sends back an HTTP response, usually containing an HTML document. The browser then renders this page, requesting additional resources like images or stylesheets as needed. This entire process occurs in milliseconds and is largely invisible to the user.

An absolute URL includes all components needed to locate a resource, starting from the protocol and domain name. For example, https://www.example.com/images/photo.jpg is an absolute URL. It specifies the full address of the resource on the Internet, regardless of where it is being requested from. In contrast, a relative URL specifies the location of a resource in relation to the current document or directory. For instance, images/photo.jpg or ../photo.jpg are relative paths that only make sense when there is a known base location, such as the current page's path. Relative URLs are typically used within websites to link between internal pages and assets, making it easier to move the site to a new domain without changing all the links. Absolute URLs are essential when linking to external resources or when precise, location-independent referencing is required, such as in RSS feeds, canonical links, or APIs.

International Domain Names (IDNs) allow domain names to include non-ASCII characters, such as letters with accents or characters from non-Latin scripts like Arabic, Cyrillic, or Chinese. Since DNS was originally designed to handle only ASCII characters (a-z, 0-9, and hyphens), IDNs must be converted into a compatible format known as Punycode before they can be used in DNS lookups. For example, the domain münchen.de is represented as xn--mnchen-3ya.de in Punycode. This encoding allows browsers and DNS systems to interpret and resolve international characters correctly. When a user enters an IDN in the browser, it automatically converts the domain to Punycode behind the scenes. This technology makes the web more inclusive, enabling domain names in native languages and scripts, which can improve accessibility and local relevance. However, it also introduces security concerns, such as homograph attacks, where visually similar characters are used to spoof domain names.

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