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.
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 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.
HTTP (HyperText Transfer Protocol): The standard way of retrieving web pages.
HTTPS (HTTP Secure): A secure version that uses encryption (SSL/TLS).
FTP (File Transfer Protocol): Used for transferring files.
Mailto: Opens an email client with a pre-filled address.
In the example https://www.example.com, https:// indicates a secure connection.
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
www is the subdomain
example.com is the main domain name
A port number (rarely visible) might look like: example.com:443
The authority tells the browser which server to connect to.
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 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
tag=seo applies a filter
page=2 specifies the second page of results
Query strings are common in search functions, blogs, and online stores.
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.
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.
A valid URL must follow specific syntactical rules to be properly interpreted by browsers and servers. Here are some important considerations:
Allowed characters: Only certain characters are allowed directly. For example, spaces are automatically converted to %20. Special characters are usually escaped.
Proper structure: The protocol, domain name, and path must be logically aligned.
No duplicate symbols: Avoid unnecessary repetitions like // or &&.
Reasonable length: Although technically long URLs are possible, staying under 2,000 characters is recommended for compatibility.
A clean and error-free URL improves both usability and search engine visibility.
There are two main types of URLs: absolute and relative.
Absolute URL: Contains the full path, including protocol and domain name.
Example: https://www.example.com/blog/article
Relative URL: Refers only to the path from the current location.
Example: /blog/article
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.
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.
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:
Use only lowercase letters and hyphens
Keep it short and relevant
Avoid numbers and unnecessary words
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:
Include relevant keywords when possible
Avoid keyword stuffing
Leave out unnecessary parameters unless functionally needed
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:
Keep URLs logical and consistent. They should reflect the hierarchy of your website.
Example:
✅ /services/web-design
❌ /page?id=42
Long URLs are harder to remember and less user-friendly. Stick to essential words only.
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)
It’s best to use lowercase letters only. Some servers treat uppercase and lowercase URLs differently, which can lead to errors.
URLs with long strings like ?id=456&ref=abc are less user-friendly. Use static paths when you can.
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.
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.
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:
More user-friendly for non-English speakers
Useful for maintaining localized URL structures
Cons:
Requires proper encoding (percent-encoding)
Not all browsers or systems handle them consistently
To safely use special characters in URLs, always apply proper URL encoding.
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:
When loading external resources on sites that support both HTTP and HTTPS
To avoid hardcoding the protocol in mixed environments
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.
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.
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.
While the basic structure of URLs has remained largely unchanged over the years, their usage has evolved significantly:
1990s: First used in static HTML websites
2000s: Widely adopted in dynamic websites and CMS platforms like WordPress
2010s: Increased focus on SEO-friendly, readable, and shorter URLs
2020s: HTTPS becomes the standard, with broader support for internationalized URLs
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.
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.
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.
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.
%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.
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.