URL Structure Best Practices for On-Page SEO
A URL (Uniform Resource Locator) is an internet address that allows users to access specific resources, such as web pages, images, videos, or files online.
It’s similar to a physical address in some ways. Just like your physical address has a hierarchy—country, state, town, street, and house number—a URL also has a hierarchy that leads users and search engines to specific pages on your website.
It looks like this:
URLs can enhance your on-page SEO efforts. If done well, they will:
- Help you organize your page so users can understand and find it easily.
- Define your URL structure so users and search engines can navigate your site easily— which is important for SEO.
In this article, I’ll discuss the different parts of a page’s URL and the best practices to improve your URL structure for SEO.
Understanding the Parts of a URL Structure
A URL structure has several parts, each with different purposes in directing users to pages on your website. Here is a visual representation of the common structure:
These are the parts of a URL and what they mean:
1. Scheme (or Protocol)
The scheme determines how a user’s browser communicates with your website’s server.
When a user enters your URL into their browser, the scheme (HTTP, HTTPS, Mailto) tells the browser what communication methods or rules to use when accessing your page.
HTTPS, for example, tells the browser to communicate securely with the website. This means that any data your visitor sends, like their password or credit card information, is encrypted— it’s secured so no one can steal it while it’s being transmitted.
Some other protocols include “mailto://” to draft emails to the address in the URL and “ftp://” to transfer files between a client and server on a network.
2. Domain Name Structure
The domain name is the human-readable part of your site’s URL that identifies your website address.
It’s an alternative to the numerical IP address computers use to identify websites and is usually your business name.
There are three parts of a domain name. There’s the;
- Top Level Domain (TLD): The TLD is the last part of the domain after the dot, like .com for commercial services, .org for organizations, or .edu for educational websites. It categorizes domains by their purpose and geography— in terms of geography, there are country-code TLDs (e.g. .co.uk for UK websites and .au for Australian websites).
For this website, we use .com because Higher Visibility is a business.
- Second-level domain (SLD): This is the main part of the domain name. It’s usually your business’s name. Ours is “highervisibility.”
- Subdomain: A subdomain is an optional part of your URL that comes before the SLD. An example is the www that comes before our SLD.
3. Subdirectory
A URL’s subdirectory comes after the domain name. It tells the browser which specific page on your website a user wants to visit. Think of it as a folder inside your website that guides users to a particular place.
For example, our about page has this URL: https://www.highervisibility.com/about-us/.
The “/about-us” after the domain name takes you straight to the about-us page. If a user doesn’t include the subdirectory and just typed “https://www.highervisibility.com,” the browser will load our homepage instead.
4. Port Number
A port number on a server handles different types of services. When a user browser connects to a server, the server may offer several services— like emails, webpages, or file transfers.
The port number identifies which service the browser needs. The default numbers are 80 for HTTP and 443 for HTTPS. Since port numbers are designated numbers, you usually don’t need to include them in your URL.
5. Query String
A query string sends specific information, such as search queries, filters, or user preferences, to your website database.
These queries start with the ? Symbol and are made up of key-value pairs to help the server understand what kind of data or action is requested.
In the example above, the ‘?’ starts the string, the query is the parameters, and the “shoes&color=red&size=10” is the value. The & connects each value pair. In this search, the query string basically tells the server to “show me red shoes in size 10”.
6. Fragment (Anchor)
The fragment takes users to a specific section within a page. It starts with a # and directs the browser to a particular element on the page, like a heading or a paragraph, without reloading the page.
It looks like this:
If this were a real URL, it would take users to the reviews section of this page.
7 Tips on How to Improve URL Structure for SEO
Your URL structure shows users what your page is mostly about, and people would go for a link that’s explanatory and easy to use over one that’s not. Here’s how to improve your page’s URL structure:
1. Use the HTTPS Protocol
HTTPS encrypts the connection between a user’s browser and your website. In other words, it makes it harder for attackers to intercept data, such as users’ payment information or passwords.
Google uses HTTPS as a ranking signal, and while it’s a small factor compared to content quality or backlinks, websites using HTTPS may see a significant boost over non-secure sites (websites with HTTP without the S).
Besides, HTTPS gives users a secure browsing experience that builds trust, which Google prioritizes in SEO.
Modern browsers like Chrome and Firefox can also sometimes mark HTTP sites as “not secure.” This means users may hesitate to access your page because the browser has flagged your site, increasing your bounce rate, which negatively impacts SEO.
2. Choose an Appropriate TLD
The top-level domain you use doesn’t exactly affect your SEO ranking. Google even says that all TLDs will be treated the same.
But, while it doesn’t directly influence how Google ranks a page, it can influence how your audience sees your brand.
A user looking to buy cars online would trust a website with a www.carsforsale.com link over one with a www.carsforsale.xyz link.
It doesn’t mean the latter doesn’t sell cars, but the client is more familiar with .com, which makes it a better choice. This is why it’s important to use a top-level domain that matches the services or products you offer.
3. Organize Your Content with Subfolders
Subfolders (subdirectories) are parts of your website that organize different sections of content on your site.
They come after the main domain in a URL.
For example, If you have a blog on your website like we do, you can put it in a subfolder, like we did with the /blog subfolder, to keep everything under your main domain.
This makes it easier to manage and track your website performance.
It also improves link building, which is very important in SEO. When you build links to your website, they increase the value and visibility of other pages in your subfolders because all your pages share the same domain. This will further increase your domain authority and overall visibility in search results.
Note: While advocating for subdirectories, be cautious against overly deep or complex structures that could confuse users or search engines.
4. Be Descriptive with URL Slugs
A slug is the last part of your URL address that describes what your page is about.
For example, our article on What is SEO? has this slug:
Your page’s slug is the best place to infuse your keywords and describe what your page is about.
In a YouTube Google SEO office hours video in 2021, George Mueller confirmed that while words in URLs are a lightweight factor, Google can use them to assess a page.
Since then, he has announced that “keywords in URLs are overrated, and mobile users don’t see them anyway.”
While Google has stated that keywords in URLs are a minor ranking factor, having a descriptive slug is still beneficial. It provides clarity to users about the page content, which can improve click-through rates.
When creating your slug, follow these tips:
- Keep your URL short, descriptive, and straight to the point.
- Avoid using special characters that search engines won’t understand. (See more in no. 5).
- Don’t add dates to your slugs. Including dates will make your content appear outdated even if it has been updated. For example, a slug, like /best-seo-tips-2023, will limit the content’s relevance over time. Instead, use an evergreen one, like /best-seo-tips.
However, you can add dates to your URL if you often audit and update your content library. This is because some readers choose web pages with publication dates in the current year over those with previous years as publication dates.
- Add your keywords to the slug. In the example shared above, “What is SEO” is our primary keyword, so we infused the word into our slug. While it’s not a major ranking factor, it still matters in SEO.
5. Use Hyphens To Separate URL Slug
Hyphens (-) act as spaces between words in a URL. They show readers where a word ends and where the other begins.
For instance,
- A URL with hyphens will look like this: yoursite.com/best-coffee-shops
- and one without hyphens will look like this: yoursite.com/bestcoffeeshops
One is easier to read than the other, and users can comprehend faster when it’s easy to read what your page is about.
Users aren’t the only ones who need hyphens; search engines also treat hyphens as word separators. Hyphens help them accurately interpret the keywords in your URL, which can improve your page’s relevance in SERPs.
Pro Tip: Avoid using other characters as your separator besides hyphens. Google especially frowns on pages that use underscores (_) because search engine crawlers don’t recognize underscores as separators.
Avoid using excessive special characters in your URLs to keep them clean and user-friendly.
6. Use Lower Cases
Most modern servers treat lower and uppercase URLs the same, but some don’t. Case-sensitive servers may treat cases as different URLs.
This means that example.com/best-coffee-shops and example.com/Best-Coffee-Shops are seen as two distinct pages.
If a link on your website points to example.com/Best-Coffee-Shops, but the actual URL is example.com/best-coffee-shops, case-sensitive servers won’t find your page, which would result in a 404 error (page not found). This can negatively affect user experience and SEO.
A consistent lowercase also helps you avoid duplicate content issues if search engines find different versions of the same URL on your page due to case sensitivity.
7. Keep Your URLs Short And Simple
If users had to choose between this:
Or this:
They’ll most likely click on the short and simple link.
Long URLs are difficult to read, remember, and share. Search engines also favor simple URLs that describe the content of the page. A short URL encourages users to click on your page and helps search engines understand your content better, improving your chances of ranking higher in SERPs.
Why Does URL Structure Matter for SEO?
URLs play a role in your SEO and help users and search engines access your website better. Here are three ways URL structure matters for SEO:
1. It Influences Search Engine Ranking
Search engines, like Google, use URLs to assess your page’s relevance to a user’s query. While this is a minor ranking factor, it still counts.
If your page’s URL is clear, optimized for your keyword, and follows best practices, it gives search engines more context about your page’s content.
A URL like example.com/seo-tips immediately tells search engines that the page is about SEO tips.
Including keywords like this can give your page a slight boost in rankings, especially when your webpage is further optimized to rank.
2. It Improves User Experience
A good URL structure gives users a clear idea of your page’s content before they click on it.
In the example above, the URL shows users that the site uses a secure HTTPS protocol. It then takes them to the domain and subdirectories (or pages where they’ll find handbags for women).
This way, they know what to expect and can easily decide which links to follow, which in this case are Nordstrom’s handbags.
In a way, it improves user experience even before they click on your page. Good URLs will also improve your site’s navigation and make it easier for users to explore other content from your homepage.
3. Link Sharing
Most websites promote their content on their social media pages. You may see naked URLs on these platforms— X, LinkedIn, Facebook, etc..—.
Here’s an example from LinkedIn:
A naked URL will give insight into the page’s content, which may encourage users to click and visit, so it’s important to follow best practices.
Descriptive URLs act as their own anchor text, and when users can see what it is about, only interested users will click, which can increase the number of quality visitors to your page.
Conclusion
URLs do influence SEO, albeit as a minor ranking factor compared to high-quality content, backlinks, and user experience signals. Their importance lies in enhancing usability and providing search engines with clear context about the page’s content. A well-structured URL can improve click-through rates, facilitate link sharing, and ensure a better user experience. This underscores why optimizing URLs is a valuable part of an SEO strategy.
Rather than dismissing URL optimization as insignificant, view it as one of the many foundational elements that, when combined, contribute to stronger SEO performance. By following the best practices outlined in this article, you can ensure your URL structure supports both your SEO efforts and user engagement.