What Is a URL?
A uniform resource locator (URL) is the web address of a specific page or file (PDF, video, image, etc.) on the internet.
A URL is what’s in your browser’s address bar as you read an article.
When you type a URL into your browser, the browser figures out which website you’re looking for and asks it to send you the requested resource.
The website’s server then sends the requested content back to your browser, which shows it to you on your screen.
Why Are URLs Important?
URLs are important because they identify every unique resource and make it easy for users to access the exact pages or files they want.
URLs also make it easy to share content with others by simply sending a link.
And search engines consider URLs when deciding which results to show. For instance, Google may review words in the URL to help determine a page’s topical relevance.
URLs benefit developers and site owners, too. Because URLs make it easy to structure sites and manage content.
The Structure of a URL
The structure of a URL consists of several distinct parts:
Scheme
The scheme is the first part of the URL that indicates the protocol—the set of rules the browser uses to request a resource.
There are several types of protocols. But hypertext transfer protocol (HTTP) and hypertext transfer protocol secure (HTTPS) are the ones you’ll see most frequently.
If a URL has the “http” prefix (e.g., “http://sitexyz.com”), then it’s using HTTP. But this protocol has security loopholes that may be used to intercept data.
HTTPS is the secure version that encrypts data transferred between a website and a server to keep it protected.
Google has confirmed that it uses HTTPS as a ranking signal.
Subdomain
A subdomain (if present) is the part of a URL that appears before the main domain name.
Distinct site sections like blogs and help centers often live on subdomains. In that case, the full URL would be something like “https://help.example.com.” Like here:
Subdomains are also helpful when a site targets different regions or languages. Semrush, for instance, uses “https://fr.semrush.com/” for French-speaking visitors and “https://es.semrush.com/” for Spanish-speaking markets.
Some SEOs dislike subdomains because they think Google views them as separate entities.
But Google’s understanding of site structures is likely sophisticated enough to understand the connection between the primary domain and its subdomains.
Domain Name
A domain name is the main part of a URL that acts like the name of a business. For example, in “www.semrush.com,” the domain name is “semrush.”
Each domain name is unique. And should be relevant and easy to remember.
Top-Level Domain
A top-level domain (TLD) is the part of a URL that comes immediately after the domain name. For instance, in “example.com,” the TLD is “.com.”
TLDs help classify websites based on their purpose, type, or location.
Here are some examples of TLDs and which types of organizations or countries they are used in:
- .com: Commercial or general-purpose websites
- .org: Nonprofit organizations or communities
- .net: Internet providers or web hosting companies
- .gov: Government departments and agencies
- .edu: Educational institutions such as colleges and universities
- .uk: United Kingdom
- .de: Germany
- .jp: Japan
- .fr: France
Using appropriate TLDs signals relevancy. For instance, a university without a “.edu” domain may look unusual to users. And country code TLDs (ccTLDs) help you attract a local audience.
Path
The path is the part of a URL that comes after the domain, such as “/blog/content-strategy-guide.” It shows users and search engines where a page lives on your website.
The path commonly includes a subfolder and a slug, though not every URL has a subfolder.
A subfolder is a section within a website that appears after the main domain name and top-level domain in a URL. For example, in “example.com/blog,” the subfolder is “blog.”
A subfolder helps organize content into different categories or directories on the same domain.
A slug is the part of a URL that comes after the domain and subfolder (if there is a subfolder). It identifies a specific page on a website and consists of words separated by hyphens that describe the page’s content.
For example, in “example.com/blog/url-structure-guide,” the slug is “url-structure-guide.”
Slugs help both users and search engines understand what a page is about.
Parameters
Parameters are values added to the end of a URL to modify a page and begin with a question mark (?).
Each parameter typically has a key and a value that are separated by an equal sign. In the example “?category=shoes,” “category” is the key and “shoes” is the value.
You can also include multiple parameters in a URL by joining them with ampersands (&).
Here’s how Nike uses parameters to show the newest men’s shoes:
URL parameters can be a useful functionality, but they can confuse users and impact your search visibility if they aren’t managed properly.
Anchor
An anchor (also called a fragment identifier) is the last part of a URL that starts with a hash symbol (#). It takes users to a specific section within a webpage rather than the whole page.
For example, in “example.com/help#pricing,” the anchor “#pricing” takes the user straight to the pricing section of the help page.
An anchor is also added to a URL when you want to link to a particular timestamp in a video or use the “Copy link to highlight” option in Chrome.
Like this:
Types of URLs
Let’s take a closer look at different types of URLs and their purposes.
Absolute URLs
An absolute URL is a complete web address that includes all the necessary information (protocol, domain, path, etc.) to locate a specific page or file.
For example:
https://www.example.com/products/shoes
Absolute URLs are often used in external links, emails, or syndicated content to ensure the link properly leads to an external resource.
Relative URLs
A relative URL is a web address that only includes the path (everything that comes after the domain).
For example:
/blog/first-post/
Relative URLs are mainly used for internal links because they’re shorter and easier to manage, especially during site updates or migrations.
Canonical URLs
A canonical URL is the preferred URL of a webpage that you want search engines to index (store in a database). It’s used when several duplicate or near-duplicate versions of that page exist.
For example, if both “https://www.example.com/shoes/” and “https://www.example.com/shoes/?page=1” show the same content, you can mark the first one as canonical.
Specifying a canonical version helps to ensure the right one is displayed in search results and keeps your pages from competing with one another.
Vanity URLs
A vanity URL is a custom, branded link that’s short, simple, and easy to remember. It often redirects to a longer or more complex URL, but it looks cleaner and is designed for marketing purposes.
For example:
example.com/sale
The main purpose of a vanity URL is to make links more appealing and easier to share, especially in ads, on social media, or in print.
You can create vanity URLs using URL shortener tools like TinyURL or Bitly. Or you can also create them in your CMS and then set up a 301 redirect to the actual page.
6 URL Best Practices
Well-structured URLs make your site easier to navigate and can elevate your SEO performance.
Below are six best practices to keep your URLs effective.
1. Use HTTPS Over HTTP
Install a Secure Sockets Layer (SSL) certificate on your website to ensure your site’s URLs begin with “https” instead of “http.”
Most web hosting providers offer SSL certificates, some even for free.
HTTPS can build trust with visitors. And it’s also a confirmed Google ranking factor.
Modern browsers now flag HTTP sites as “Not Secure.”
We analyzed a selection of keywords to determine how many of the top 100 search results for each keyword are HTTP URLs.
Keywords |
Number of HTTP URLs in the Top 100 Search Results |
healthy eating tips |
0 |
how to get a passport |
1 |
what is seo |
0 |
how to get a work visa in france |
0 |
is green tea healthy |
1 |
summer vacation ideas |
0 |
what is a url |
0 |
what is a pension plan |
0 |
irs file taxes |
1 |
texas car registration |
9 |
Out of the 1,000 analyzed search results, only 12 were HTTP URLs across four different keywords. This provides evidence that using HTTPS across your site may benefit your search engine rankings.
2. Keep It Short and Simple
Create URLs that are easy to read, type, and remember. Because these types of URLs look better to users and are easier to share.
For example, use “example.com/shoes” instead of “example.com/category/products/footwear/shoes123.”
3. Use Clear and Descriptive Words
Write URLs using plain but specific words that accurately describe the page content. Avoid vague terms, abbreviations, or auto-generated codes.
For example, use “example.com/blog/how-to-write-a-resume” instead of “example.com/post?id=456.”
We also recommend you avoid numbers to reduce the chances that you need to update the URL when you refresh a piece of content.
Here’s how we wrote an article on the top 10 writing tips without using the number in its URL:
Plus, clear URLs give search engines useful context about the page’s topic. This can improve rankings.
4. Be Careful with Parameters
Use parameters when they’re needed, such as for tracking or filtering content. But be sure to include a canonical tag (HTML that indicates the main version of a page) to identify the primary version of a page that doesn’t contain parameters in the URL.
Carefully managing parameters reduces the risk of duplicate content—when you have multiple pages with identical or nearly identical content. This can confuse search engines about which page to prioritize, and that can prevent all versions from showing in search results.
To determine how frequently parameters show up in top-ranking URLs, we looked into the top 100 search results for each of the following 10 keywords.
Keywords |
Number of Parameterized URLs in the Top 100 Search Results |
healthy eating tips |
8 (mostly YouTube pages) |
how to get a passport |
5 |
what is seo |
18 (mostly YouTube pages) |
how to get a work visa in france |
7 |
is green tea healthy |
10 |
summer vacation ideas |
3 |
what is a url |
17 (mostly YouTube pages) |
what is a pension plan |
5 (mostly YouTube pages) |
irs file taxes |
13 (mostly YouTube pages) |
texas car registration |
14 (mostly YouTube pages) |
Out of 1,000 analyzed search results, parameters have shown up in 100 URLs. And 75% of these are URLs of YouTube pages.
This aligns with the idea that URLs with parameters don’t appear as often in search results.
YouTube pages generally contain parameters. So, it’s unsurprising to see those pages ranking.
5. Use Hyphens to Separate Words
Use hyphens (-) in slugs to separate words instead of underscores (_), including spaces, or running words together.
Hyphens improve readability for users, especially when URLs are shared in plain text or read aloud. They also make it easier for users to understand what a page is about.
Also, Google recommends using hyphens because they help “search engines identify concepts in the URL more easily.”
6. Stick to Lowercase Characters
Make sure all your URLs use lowercase letters because URLs can be case-sensitive.
This means “example.com/About” and “example.com/about” could lead to two different pages if you have one for each. And that creates duplicate content issues.
Plus, lowercase URLs are easier to read, type, and share.
Check Your URLs for Issues
Manually reviewing URLs for the above issues can be time-consuming.
Semrush’s Site Audit tool can help you identify issues with URLs automatically.
Follow the prompts to configure your audit. Then, navigate to the “Issues” tab and search for “URL.”
This will display certain URL issues your site might have. Like URLs containing underscores. Or URLs that are too long.
The tool also provides advice on how to solve a particular issue.
Give Site Audit a try.