Tuple Logo
URL-Uniform-Resource-Locator

SHARE

URL (Uniform Resource Locator)

What is a URL?

A URL (Uniform Resource Locator) is the web address used to access a specific resource on the internet, such as a web page, image, or file. Whenever you visit a website or click on a link, you’re actually using a URL to retrieve the correct location.

The URL is a fundamental part of how the internet works. Every page, image, or video available online has a unique URL that allows users and systems to find it. In addition to identifying the location of a resource, a URL also tells the browser how to access it, usually via the HTTP or HTTPS protocol.

URLs are used every day, often without much thought. Whether you're typing www.example.com, clicking on a search result, or sharing a link, you're relying on a URL. Behind the scenes, URLs consist of several components that work together to ensure the correct content is delivered efficiently.

The structure of a URL

A URL is made up of several components that together determine where a resource is located and how it should be accessed. This structure ensures that web browsers know exactly what to do and where to find the requested content.

Let’s use an example to break it down:

https://www.example.com/blog/article?tag=seo#content

We’ll now go through each part of this URL step by step.

The protocol

The first part of a URL is the protocol, such as http, https, ftp, or mailto. It tells the browser how to communicate with the server.

In the example https://www.example.com, https:// indicates a secure connection.

The authority

After the protocol comes the authority, usually made up of the domain name, sometimes preceded by a subdomain, and optionally a port number.

Example: www.example.com

The authority tells the browser which server to connect to.

The path

The path indicates where the requested resource is located on the server. It comes directly after the domain name.

Example: /blog/article

This helps organize content. A clear and logical URL path is also helpful for navigation and SEO.

The query string

The query string contains parameters used to request dynamic content. It begins with a question mark ? and includes one or more key-value pairs separated by &.

Example: ?tag=seo&page=2

Query strings are common in search functions, blogs, and online stores.

The fragment identifier

A fragment identifier, also known as an anchor, links to a specific part of the same page. It starts with a hash #.

Example: #content

This tells the browser to scroll directly to a particular section, like a heading or paragraph.

Key characteristics of a URL

Not every URL is equally effective. Especially for professional websites and platforms, it’s important that URLs are correct, clear, and functional. In this section, we’ll discuss what makes a good URL and how different types, such as relative and absolute URLs, are used.

Requirements for a valid URL

A valid URL must follow specific syntactical rules to be properly interpreted by browsers and servers. Here are some important considerations:

A clean and error-free URL improves both usability and search engine visibility.

Relative vs. absolute URLs

There are two main types of URLs: absolute and relative.

Relative URLs are useful within your own domain or content management system, as they’re more flexible when moving between environments (e.g., development and production). Absolute URLs, on the other hand, are required when linking to external resources or when you want to be sure the full path is specified.

URLs and SEO

A well-structured URL not only helps users but also plays a role in how search engines index and evaluate your page. URLs are an important part of technical SEO, especially when it comes to structure, relevance, and click behavior.

Permalinks and slugs

A permalink is a permanent URL that points to a specific page or blog post. The term is a combination of "permanent" and "link." Permalinks ensure that a page remains accessible under the same address, which is essential for link building and discoverability.

The slug is the last part of the permalink, usually based on the page title. For example:

https://www.example.com/blog/what-is-a-url

Here, what-is-a-url is the slug.

Tips for good slugs:

Using keywords in URLs

Including keywords in a URL can improve visibility in search engines. A clear URL helps users understand what a page is about, increasing the likelihood of clicks.

Compare:

https://www.example.com/page?id=123

with

https://www.example.com/cheap-travel-europe

The second URL is not only more readable for users but also easier for search engines to interpret.

Best practices:

How to create a good URL

A strong URL is clear, short, and logically structured. This helps users understand where they’re going and makes it easier for search engines to crawl and index your content. A well-crafted URL structure supports both usability and SEO.

Below are some practical guidelines:

1. Use a clear structure

Keep URLs logical and consistent. They should reflect the hierarchy of your website.

Example:
/services/web-design
/page?id=42

2. Keep it short and relevant

Long URLs are harder to remember and less user-friendly. Stick to essential words only.

3. Use hyphens (kebab case) instead of underscores (snake case)

Prefer kebab case, where words are separated by hyphens (-). This format is easier to read for users and better understood by search engines. Avoid snake case, which uses underscores (_), as search engines don’t interpret them as spaces.

Example:
/what-is-a-url (kebab case)
/what_is_a_url (snake case)

4. Avoid uppercase letters and special characters

It’s best to use lowercase letters only. Some servers treat uppercase and lowercase URLs differently, which can lead to errors.

5. Avoid dynamic parameters (where possible)

URLs with long strings like ?id=456&ref=abc are less user-friendly. Use static paths when you can.

6. Prevent duplicate content

Make sure the same page isn’t accessible through multiple different URLs, unless you’re using canonical tags. This helps avoid confusion for search engines.

Internationalized and protocol-relative URLs

In addition to standard URLs, there are special types that are useful in certain scenarios, such as multilingual websites or support for both HTTP and HTTPS. Two important variations are internationalized URLs and protocol-relative URLs.

Internationalized URLs

An internationalized URL (also called an IRI, Internationalized Resource Identifier) allows the use of characters which are not in ASCII in a URL. This includes accented letters (like é, ü) or characters from non-Latin scripts, such as Arabic, Chinese, or Cyrillic.

Example:

https://example.com/mañana

In practice, these characters are automatically encoded to ensure compatibility:

https://example.com/ma%C3%B1ana

Pros:

Cons:

To safely use special characters in URLs, always apply proper URL encoding.

Protocol-relative URLs

A protocol-relative URL omits the protocol (http or https) and starts with //. The browser will automatically use the same protocol as the page that’s being loaded.

Example:

<script src="//cdn.example.com/lib.js"></script>

If the user is browsing via https, the browser will load the file using https as well.

When to use:

Note:
Protocol-relative URLs are now considered outdated in most cases. As HTTPS has become the default standard, it's better to explicitly use https:// to ensure secure and consistent behavior.

History of the URL

The URL, or Uniform Resource Locator, has been a fundamental part of the internet’s infrastructure since its early days. The term was officially introduced in 1994 by Tim Berners-Lee, the inventor of the World Wide Web.

Origin and purpose

URLs were developed as a standardized way to uniquely identify and locate resources on the web. Before URLs, addressing files and locations online often depended on the protocol or operating system being used.

With the introduction of URLs, any resource, whether a web page, image, video, or document, could be accessed using a universal format that browsers could interpret.

Evolution

While the basic structure of URLs has remained largely unchanged over the years, their usage has evolved significantly:

There have also been related formats introduced, such as URIs (Uniform Resource Identifiers) and URNs (Uniform Resource Names), though in practice, URLs remain the most commonly used format.

What you need to know about URLs

A URL (Uniform Resource Locator) is the web address used to access a specific resource on the internet. URLs consist of several parts, such as the protocol, domain name, path, query string, and fragment identifier, that together define where and how a resource can be retrieved.

Building and using URLs correctly is essential for accessibility, usability, and search engine visibility. Well-structured URLs improve SEO, make navigation clearer, and give your website a more professional appearance.

Whether you're a developer, marketer, or website manager: understanding how URLs work and what to keep in mind when creating them is always valuable.

Frequently Asked Questions
What is the difference between a URL and a URI?

A URL (Uniform Resource Locator) specifies both the location of a resource and how to access it (e.g., via https). A URI (Uniform Resource Identifier) is a broader term that includes both URLs and URNs. Simply put: every URL is a URI, but not every URI is a URL.


Are spaces allowed in a URL?

Spaces are not directly allowed in URLs. They are automatically encoded as %20. It’s best to avoid spaces altogether by using hyphens (kebab case), for example: cheap-europe-travel.


What does %20 mean in a URL?

%20 is the encoded version of a space character. URLs cannot contain literal spaces, so they must be encoded using percent encoding. Other special characters are encoded in a similar way.


Do uppercase letters matter in URLs?

Yes, they can. Some servers treat uppercase and lowercase letters differently in the path part of a URL. That means /Article and /article could lead to two different pages. To avoid confusion, it’s best practice to use lowercase only in URLs.


Articles you might enjoy

Piqued your interest?

We'd love to tell you more.

Contact us
Tuple Logo
Veenendaal (HQ)
De Smalle Zijde 3-05, 3903 LL Veenendaal
info@tuple.nl‭+31 318 24 01 64‬
Quick Links
Customer Stories