You know how every house has an address so mail can find it?
A URL is like that for websites. Every time you use a link with letters, dots, and slashes to access a page on the internet, you are making use of a URL.
So, what is a URL? What do all the letters and symbols mean, and do we need every component to access the resources we need?
Let’s break down the basics and get you familiar with everything you need to know about a URL.
What is a URL? (Quick answer)
A URL (Uniform Resource Locator) is the address of a webpage on the Internet. For example, a URL can help locate an image, file, or document.
Think of a URL as the online equivalent of an address that guides you to the exact page you want to find. They don’t just work for websites.
A URL can guide you to an email, app, or bookmark list.
Why Is a URL Important?
It is not just an address.
URLs play a critical role in accessing, sharing, and optimizing online content. This is why URLs matter:
1) They Provide Direction
URLs enable users to reach the correct destination when accessing digital resources. They are an internet GPS, guiding users and browsers to the proper webpage.
Without a URL, you would have to remember a string of numbers known as the IP address to access websites.
2) Search Engine Optimization
URLs help improve user experience by providing search engines with a page’s information. Furthermore, URLs help search engines understand topics on a page. Also, the URL facilitates search engine crawlers in indexing.
If you have a blog, having user-friendly URLs helps your audience to have a clear idea of what to expect from a post. URLs also support the shareability of content, hence improving traffic on a website.
3) Enhance User Experience
It is easy to share, navigate, and remember well-organized URLs. Additionally, users can easily predict the content on a page without visiting the site, making it easy for them to share and explore within seconds.
4) Builds Trust
Having a secure URL, such as (https://
), can build user trust because it ensures encrypted data transfer. Additionally, a well-chosen domain name in the URL can instill confidence in a website.
When building a digital foundation, having a well-structured URL and a professional domain name can help establish trust in your digital brand.
5) Web Organization
URLs facilitate hyperlinking to different web pages. Linking improves the navigation experience between different pages.
Website organization is critical for search engines and enhances the user experience.
Anatomy of a URL
A URL comprises several components, and each part plays a crucial role in directing your browser to the correct resource.
An example of a URL is https://www.truehost.co.za/hosting?ref=promo#pricing
Now let’s break the URL down into parts in the table below:
Component | Description | Example |
Scheme | Defines data transfer | https:// |
Subdomain (Optional) | An optional prefix before the domain | www |
Domain | The website’s address | truehost |
Top-level domain | Extension at the end | .co.za |
Path | Directs to a specific page | /blog/webhosting |
Query parameters | Adds extra information or data | ?ref=promo |
Fragment | Directions to a specific spot on the page | #pricing |
Every Part of a URL is Critical
There are several types of protocols and schemes, for example:
- FTP for file transfers
- SMTP for emails
- TPC / IP for communication between devices
- Telnet for remote access
Still on the scheme, it is essential to note that there are two protocols: HTTP (Hypertext Transfer Protocol) and HTTPS (HTTP Secure).
HTTP is vulnerable to data interception and hence insecure. On the other hand, HTTPS features encrypted data transmission, making it a secure protocol.
The subdomain improves website navigation and user experience by organizing different sections on the website.
For example, the hosting section on truehost.co.za
is located at https://truehost.co.za/hosting/
, while the domain section is accessible at https://truehost.co.za/domains/
.
This allows users to navigate between the two products without confusion.
The domain is the identity of a website. A good domain name is simple, professional, and easy to remember.
Unlike vague paths, a clear, keyword-rich path helps search engines better understand a website’s content. An example:
Clear Keyword-rich path | Vague path |
/blog/web-hosting | /page123 |
The query parameter adds extra data that can be used in tracking and filtering. Fragments enhance the user experience and have a minimal impact on SEO.
Types of URLs: Absolute vs Relative
If you have interacted with URLs, you are likely familiar with two main types: absolute and relative.
Here’s what you need to understand about them:
a) Absolute URL
An absolute URL is a complete address to a specific page or resource on the Internet.
It features all the components of a URL. An example of an absolute URL is: https://truehost.co.za/domains/transfer/.
With an absolute URL, you have everything you need to locate a specific page anywhere on the internet.
Absolute URLs secure a full path, ensuring there is zero ambiguity about the location of a resource. Whenever you use an absolute URL, you are guaranteed to reach the correct destination.
b) Relative URL
A relative URL does not have the protocol or domain. It is precise to the path that gets you to a specific page.
For example, /domain-registration
is a relative URL that points to the domain registration on the same page.
Relative URLs are handy when navigating a website. They are perfect for website building because they are easy to maintain and update.
For example, relative URLs are helpful when moving a site to a new domain. With a relative URL, you do not have to rewrite the link.
Note: relative URLs are only efficient when used internally. Your browser cannot know which domain to reference when using a relative URL.
When to Use Each
Your perfect choice comes down to context.
If you want to share content on other digital platforms or embed links in emails, it is recommended to use an absolute URL. With absolute URLs, you can rest assured that wherever you drop it, it will take the user to the intended destination.
Relative URLs, on the other hand, play a pivotal role in development. They are suitable for internal site navigation. For example, if you want to link pages on the same website, relative URLs are a must.
How URLs Work
While the time between entering a URL into your browser and having a webpage displayed on the screen can be as little as a millisecond, a complex process of communication and multiple systems working together is involved.
Here’s a breakdown:
DNS Look-up
The URL contains words that a computer cannot understand. After typing the URL into the browser, it looks for an IP address.
If it does not know the address, it sends a request to the DNS resolver. The DNS resolver collaborates with other servers to find the address.
TCP/IP Connects
After finding the IP address, your browser establishes a connection with the server using the TCP/IP protocol.
This step ensures the safe transfer of encrypted data from the server to the browser.
HTTPS Request
Your browser sends an HTTPS request to ask for the webpage. It requests:
- Specific URL path
- Header
- Any query parameters
Server Processing
The server receives the request and identifies how to resolve it. If the request is for static content, such as simple HTML files, it can be responded to immediately.
Rendering
The server sends the response via an established connection.
URL Best Practices and Mistakes To Avoid
If you have a website and want to be Google’s favorite during ranking, you cannot afford to go wrong with your URLs.
Best practices for URLs:
- Use short and descriptive URLs to make them easy to share and comprehend
- Use relevant keywords in the URL for search engines to understand your content
- Use hyphens to separate words instead of underscores
- Use lowercase to prevent duplicate content and errors
Mistakes to avoid:
- Lengthy URLs
- Mixing HTTP/HTTPS content can display warnings and scare web visitors away
- Mixing of uppercase and lowercase
- Stuffing URLs with tracking IDs
What You Need To Remember
A URL is the key to accessing any digital resource. It provides directions, boosts SEO, enhances user experience, and enhances web organization.
All the URL components work collaboratively to organize the different sections of a website.
The internet runs on URLs. If you have a website, consider having short, keyword-rich, and clutter-free URLs.