February 8, 2024

How Do I Format a URL for SEO?

URLs are the building blocks of your online presence. URL stands for Uniform Resource Locator and they are a type of  URI (Universal Resource Identifier), that is a string of characters that identifies a resource online and locates it on the internet. 

Your website’s online presence is made up of a multitude of URLs that localise all of the content and resources you want to make available to online users. Getting your URL structures right, both semantically and technically, is therefore essential to your online visibility.

In this blog, we will provide you with the fundamentals of URL formats and best practice guidance for formatting URLs for SEO. 

Understanding URL format

All URLs are made up of a series of consistent components:

Scheme

The scheme indicates what protocol browsers should use to access the website. The most common schemes are:

The Host Name

The host name is the part of the URL between the Scheme and the Path that identifies who holds the resources presented by the URL. 

Inside the part of the URL known as the hostname, there are a series of other components:

The Path

The path refers to the static part of the URL that follows the host name. Just like the name indicates, the path serves to indicate the ‘route’ to the desired resource. It can be made up of several sections separated by forward slashes. These usually indicate the directories (folders and sub-folders) and the name of the files accessed. The structure of the path is also generally a reflection of the website architecture. More on this below.

Query String

The query string is another optional element that can be used in URLs. It usually contains a number of parameters used to filter and organise the content within a resource. Queries are identified by a ‘?’ sign that precedes the string of characters after the path.

Query strings are dynamic – that means they are not concrete static ‘addresses’ for content, but rather dynamically generated from the database based on custom inputs. 

Fragment

The fragment appears at the end of URLs and is preceded by the # sign. It is used to refer to a specific location within a page. For example, on this page, we can link to different sections of this blog by adding links with fragments that mark a specific heading or paragraph.

How to Format URLs for SEO?

URL structure is important for both user experience and search performance. When optimising your website, an SEO specialist will review the structure and content of your URLs to ensure that they allow both users and search engines to understand the content of your pages and structure of your website, and that no excessive or unsafe characters are used.

Now that we understand the regular format of URLs, let’s have a look at what best practice guidance says about formatting URLs for good SEO performance. 

URL Scheme Best Practice

Does URL scheme matter for SEO results? Yes! Best practice recommends that your website be secure, and search engines prioritise sites that use the HTTPS protocol, as it demonstrates that the website is secure and can be trusted. For your site to be secure, you need to have a valid SSL certificate on the site (the S part of HTTPS).

Using a secure protocol also ensures that data is not intercepted and modified between the server and browser, keeping your and your users’ private data secure. 

Every URL on your site must use a secure protocol, and so do your internal links. This is to avoid mixed content warnings (that is when unsecured HTTP resources are used on secure pages).

Preferred Version of the Domain

It’s important to note that search engines understand each unique string of characters as a unique online address. 

For example, the version of your host name containing the www. subdomain will be read as a different address from the one without it. This may lead to duplication issues, inefficient use of your crawling budget, and poor distribution of SEO value across your links. To avoid these issues, your website should determine the preferred version of the URLs through 301 redirection and canonical directives.

Whether you should choose to go with the subdomain (www.) or not is an issue for another blog. The important thing is that once you choose a preferred version (your canonical domain), your online presence is consistent. To achieve this, your server should return a HTTP 301 redirect when receiving requests for the non-canonical version of the domain.

In practice, this means that https://www.wildcatdigital.co.uk will redirect to https://wildcatdigital.co.uk. Following the same principle, the http:// version and any other variations of the URL should be similarly redirected to the preferred version.

URL Structure Best Practice 

Creating a clear and logical site hierarchy is essential in helping both users and crawlers navigate your site and find relevant pages. This hierarchy should be reflected in your navigation menu, as well your URL structure. 

Start by thinking about your content and how it can be organised in a way that is hierarchical and logical. For big eCommerce sites, for example, this may mean creating general categories, relevant sub-categories, and product pages. For example, if you run an eCommerce site that sells furniture, your menu navigation may look something like this:

This hierarchy will be translated into your URL structure in the form of folders and nested sub-folders. For example, the URL for the ‘standing lamps’ category may look something like this:

These URLs tell the users exactly where they are located on your website, and the relation these sub-categories have with the main bedroom category. 

URL Path Best Practice 

Once you have got your site structure down it is time to think about the actual content of your URL paths. How can you make your page and folder URLs work for your SEO strategy? There are a few best-practice tips to consider:

Make URLs Work for Users and Search Engines

Should you use keywords in your URLs? Where possible yes, but remember that keyword-targeting in your meta titles, headers and on-page copy will have a much bigger impact on your SEO performance and your focus when creating URLs should be on keeping these concise, descriptive, and easy-to-read, making it easier for both users and search engines to understand the content of your pages. 

For years, Google has downplayed the importance of keywords in URLs, turning attention to the user. This is not to say that including your key terms in URLs is not important, if your pages target relevant keywords, you will most likely organically include these in your titles and URLs. 

However, we need to consider more than our target keywords when deciding on the optimal content of our page paths. Think about using concise and descriptive words and phrases in your page and folder URLs. The optimal URL for your folders may not always coincide with your target keyword. 

For example, while your target keyword for the lamps collection mentioned above may be ‘bedroom lamps’, including this keyword in the URL path will clutter the URL and may even lean into keyword stuffing 

/bedroom-furniture/bedroom-lamps/standing-lamps/

A much more readable and concise alternative will be:

/bedroom/lamps/standing/

Use Consistent Capitalisation – Lowercase

The path, file name, and query string parts of your URLs are case sensitive, so different capitalisation can lead to the same URL being read as two different pages. 

/blog/ will be understood as a different page path to /Blog/ – potentially leading to duplication issues. 

It is best practice to stick to lowercase in your URL paths, file names, and query strings.

Avoid Special Characters

Valid URLs are limited to the use of alpha-numeric symbols (number and letters), some characters that can be used to create text strings (- _ . ~), and a number of reserved ‘control’ characters that have defined meanings (like the ? used to indicate the beginning of a query string).

All other special characters should be avoided. If they must be used, they need to be percent encoded, to be represented using the previously mentioned characters. 

Use Hyphens Over Low Bars

Google’s documentation on URL best practices recommends separating words in your URLs and doing so with hyphens rather than underscores. 

From a user experience point of view, underscores make bare URLs confusing as the signs used to separate the words merge with the underscoring that indicates a hyperlink. 

https://wildcatdigital.co.uk/blog/how-to-format-urls-for-seo/

vs.

https://wildcatdigital.co.uk/blog/how_to_format_urls_for_seo/

To Slash or Not to Slash

Whether or not you should use a trailing slash at the end of your page URLs is not a clear-cut issue. If we are to get technical, the official advice would be to use trailing slashes for folder URLs but not pages. 

However, choosing one or the other will not affect your SEO performance

What is extremely important for your SEO is that you use 301 and canonicalisation to indicate the preferred version of your URLs. As we have explained above, any difference in the string of characters of your URLs will lead to them being understood as separate pages. 

So, unless they are accurately redirected and canonicalised, Google will read https://wildcatdigital.co.uk/blog/how-to-format-urls-for-seo/ and https://wildcatdigital.co.uk/blog/how-to-format-urls-for-seo as different pages, potentially indexing both and leading to duplication and cannibalisation issues. 

Conclusion

Formatting URLs for SEO means taking into consideration both search engines and users. You’ll need to ensure that your URLs are well-formatted, concise and descriptive, as well as paying attention to the technical setup of your website. 

As your website grows, you should carry out regular reviews of your URLs, internal links, and canonicalisation to ensure that your site stays in good health. If you need help with your SEO strategy, get in touch with our team today for a free consultation. 

Post by

Miruna Hadu

More blogs.

View all