How to create a well-structured SEO-friendly URL

Written by
Maria Yefimenko
Reviewed by
Olena Karpova
Jan 28, 2021
17 min read

Are URLs important for users and SEO? In short, yes, they are. Of course, page load speed, content quality, the right target keywords, and other factors may have a bigger effect on your SEO, but bad URLs can sabotage your rankings too. Here, we will provide up-to-date information about URLs, their structure, types, and ways to optimize them properly. 

What is a URL address of a website

A URL, or Uniform Resource Locator, is the web address of a unique online resource on the Internet that you type in the browser search bar. Online resources may be different: HTML pages, CSS files, as well as web images, have their unique URL addresses. There may be some exceptions. For example, some URLs may lead you to pages that no longer exist. Still, it is an address used to access a particular page, site, image, and also to understand what type of content they may see. That’s why creating correct and user-friendly URLs is important. 

AI-POWERED ON-PAGE SEO CHECKER
Enter a URL and get your free report

While a lot of users know what URL stands for, they probably haven’t heard of URI. Some people think that URL and URI are interchangeable terms, but it’s not exactly right. While URL represents a location, a URI can represent a name, a locator, or both. Simply put, URIs can be URLs, but URLs cannot be URIs. 

What is URI

Website URL structure

Website URL structure

Now, let’s learn about the anatomy of a URL:

  • Protocol (also called transfer protocol or scheme) determines how data is transferred between the host and a client. In most cases, this is HTTP or HTTPS, but there are also other protocols like FTP, TCP, NTP, etc. 
  • Subdomain is a part of the main domain. It is used to organize different sections of the site, for example, cars.yoursite.com, where “cars” is a subdomain. 
  • Domain is the name of the site. 
  • Top-level domain—root domain, for example, .com, .org, .uk, .net, .de, etc. 
  • Subfolder—the name of a specific section of your website. For example, yoursite.com/blog, where “blog” is a subfolder. 
  • Slug—a part of a URL that identifies a specific page, for example, yoursite.com/blog/what-is-url, where “what-is-url” is a slug. 
  • Anchor—an element that allows a user to jump to a specific part of a page without scrolling.

Note that not all of these elements are mandatory. You may include or not include an anchor, a subdomain, or a subfolder, etc. 

The first three parts of a URL—protocol, domain name, and top-level domain (TLD)—appear before the first slash and represent the website address. When creating a website, you should choose a unique domain name and TLD that comes after the dot in a URL (.com, .edu, .uk). TLDs show the purpose of a site, its location, or specific entities, like governmental organizations. You can find the different types of TLDs in the picture below. 

Types of TLD

Although it is no longer necessary to include “www, a website address sometimes also has this prefix. Then, you can create subdomains and purchase SSL certificates to have HTTPS in a URL. If you are still using HTTP, we recommend switching to HTTPS right away.

Next, you should create a website structure by adding subfolders and categories, for example, https://example.com/blog. 

The last part of a URL is a slug that identifies a particular page and explains its content. The process of optimizing the slug is basically the same as creating SEO-friendly URLs.  

How to optimize a URL slug

It’s no secret that most mistakes are made when creating a URL slug. And this is one of the most important elements of the URL address—easily digestible slugs positively affect your SEO performance. So, how to create them? Follow the simple tips below:

  • Start with your page title. The title is really important for SEO, but this is not the only reason why you should make it relevant, short, and easy-to-understand. If you use a popular CMS and install plugins that automate most processes, your title may be used to automatically generate a slug. 
  • Remove special characters. Exclude any extra numbers, letters, and other symbols you don’t really need for a clean URL. 
  • Remove superfluous information. An SEO-friendly URL is a short URL. Most beginners make the same mistake—they create very long slugs. Remove all the unnecessary words, including articles. For example, you can turn your how-to-create-a-really-good-url-easily into something like how-to-create-good-url, and that will be a much better option. To detect URLs that are too long, conduct a website SEO audit. This will be your starting point in URL slug optimization. 
  • Add keywords. Using keywords is essential for a search engine and a user to understand what exactly can be found on your page. 
  • Make it readable. Your URL slug shouldn’t sound weird, unnatural, incoherent, or too long. It should be as clear and easy-to-read as possible. 
  • Make it lowercase. Don’t use uppercase letters in your web address. If you accidentally mix letters, you can create duplicate pages. 
  • Replace spaces and underscores with hyphens. Also, you shouldn’t turn your URL slug into a single word. For example, the correct slug will be how-to-create-right-url instead of “how to create right url”,  “howtocreaterighturl”, or how_to_create_right_url.

What are good URLs

A good URL is also called semantic or a clean URL and has the following characteristics:

  • it is not too long
  • it has no characters that need encoding (spaces, “, <, >, #, %, |)
  • it contains keywords
  • it is readable and easy-to-understand 
  • it includes a logical folder structure
  • it has HTTPS instead of HTTP

Need examples? Here are two URLs, and we bet you understand which one is good and which is bad immediately.

  • www.website.com/blog/winter-vacation-berlin
  • www.website.com/sdkfjb/ryba/sdfkjb-2017/sdfhhha

As you can see, they look completely different. The first one is an example of an SEO-friendly URL, and the second is an example of a bad URL. It is clear that the first address is much better for a user who understands what kind of information they will find on this page and even what is the platform (blog). The second URL tells nothing. 

This is the first reason why you should have good URLs—after all, they are the first things that a user sees in Google search results. Hence, they are good for SEO, but you should consider that URLs themselves will not help you to get on the top of Google. The search engine cares more about the site structure (and URLs as the elements that are related to this structure), semantics, and the content itself. Still, you shouldn’t underestimate the importance of clean URLs. A user probably won’t click on your link if you have a super-long address related to the bad website structure, Google or another search engine will not promote your website. 

Don't make too long URLs

What are bad URLs

Let’s take a look at bad URLs in more detail. A URL is bad if: 

  • it contains too many keywords
  • it is too long
  • it doesn’t provide a user with information about the content on the web page
  • URL structure is wrong and illogical
  • it includes extra letters, numbers, and symbols

But what exactly can happen if your URLs are bad? Here are the possible consequences:

  • They will worsen the general user experience, fewer people will use the link.
  • Duplicate content is likely to be created.
  • There may be security vulnerabilities.
  • They can reduce SEO effectiveness.

How to create a search-friendly URL structure

Now, we know that bad URLs are really bad. But what are the URL best practices? What if you have thousands of pages and cannot edit every single web address manually? There are SEO-friendly URL generators that can create shorter URLs for you. You can either use one of the online generators or use plugins offered by your CMS. 

If you want to optimize the process instead of creating and checking every single URL manually, you should pick a permalink structure that fits your website.

Don’t look for too complicated solutions. We recommend using simple, clean permalinks. You may add a post name to the domain name. Or use categories to create a hierarchy in URLs. Just make sure that your URLs are not too long. 

As you can see, there are many things to consider. We’d like to focus on the most important elements and bring you some examples of good and bad practices. Here is what you should take into account when creating a URL. 

Keywords in URLs

According to John Mueller, the Senior Webmaster Trends Analyst at Google, keywords in URLs remain a very small ranking factor and it is not something to force. With that said, it’s not necessary to restructure your site just to insert keywords in your URL. 

But if you create new pages, it is a good idea to include relevant keywords just like you do with your posts. Remember though that making a URL too long is a bad idea, so you shouldn’t use too long phrases. 

  • Good URL example: http://www.website.com/how-to-make-good-url
  • Bad URL example: http://www.website.com/how-to-create-the-best-url-for-the-website-easily 

1-2 keywords in URL are usually enough to provide a user and the search engine with the necessary information. To make sure that this is a winning keyword for you, we recommend using SE Ranking’s Keyword Suggestion Tool to select the relevant keywords faster. 

SE Ranking's Keyword Suggestion Tool
DO KEYWORD RESEARCH
Enter a search term and find untapped keyword opportunities to make your site more visible in search.

URL length

How long can SEO-friendly URLs be? Potentially, they can be very, very long. The limit is 2,083 characters for Microsoft Edge. This, however, doesn’t mean that you need such a long URL. The right balance is making your URL around 75 characters long. The longer URL will be indexed too, but they will affect user experience. 

What is a URL shortener?

Long addresses should be shortened, especially if you want to share them with someone. Now, we can use services like Bit.ly or TinyURL to hide the part of the link. 

Note that in some countries (Saudi Arabia) as well as on some platforms (Twitter, MySpace), such services are blocked mostly because such links can take a user anywhere. Still, shorteners are often used by lots of people and organizations worldwide. 

This is how the full link looks: https://seranking.com/se-ranking-for-smbs.html, and here is an example of a short web address that we got using Bit.ly: https://bit.ly/355sKQs.

The second link will take users to the same SE Ranking page. 

File and path structure

When you’re building a website, you need to make sure that all your files are assembled into a sensible structure. That’s why it makes sense to structure your website into categories, folders, and subfolders. For example, when your web address looks like this https://example.com/winter-clothes/coats rather than just https://example.com/coats, your visitors will understand where they are. 

Titles and URLs

Titles and URLs don’t have to match, but it is a good practice as well as keeping URLs short. That’s how you can use the relevant keyword in your URL, make it more readable, attract more users, and create a great link to share on social media. Moreover, it is all about readers’ expectations—using the same keywords in the title and URL helps you to not disappoint them. 

File extensions in URLs

According to John Mueller, file extensions like .html, .asp, .php don’t affect your ranking. It doesn’t matter if your URL has or has no extension—if your site looks like this http://www.example.com/blog.html, it will show up in the same way in Google search results. 

In most cases, webmasters want to remove them to make URLs shorter and more user-friendly (which makes sense) but you should consider that sometimes it harms the website. By removing the extension, you have to redirect old URLs to new addresses, which can take some time. 

Hyphens (dashes) and underscores 

You should use hyphens in your URLs. Google treats them better than underscores for one reason—hyphens separate words and are interpreted as spaces, whereas underscores in your URLs aren’t recognized. For example, if you use “my_trip”, Google will interpret it as “mytrip” instead of “my trip.“

A trailing slash in a URL

URLs with trailing slashes commonly represent a directory, and those without a trailing slash represent a file. But in fact, there is no difference for Google whether a URL has or has no trailing slash. The important thing is to make sure that you don’t have both of them containing different content. For example, if two URLs www.example.com/products/ and www.example.com/products serve duplicate content, then you have to choose one of the URLs as the main version. It doesn’t matter which one. 

URL capitalization 

URLs are case sensitive. If you use capital letters, you are creating different addresses, even if the only difference between them is just the uppercase. That’s why we recommend using only lowercase in a website address. If you find duplicate URLs, it’s important to consolidate them with canonicals or use 301 redirects

Numbers in a URL

We recommend removing numbers from URLs, if possible. Let’s say, you have a news website. You may want to add a date to all your web addresses. Still, you need to think twice and decide if you really need it. The thing is the content that you published some time ago may seem outdated to a user. 

Another reason for avoiding numbers is changing content. For example, the number is a part of your URL that contains this slug: 5-ways-to-improve-urls. Later, you decide to edit your post by adding one extra way to your list. By doing this, you will have to change the title and the address, which means redirecting to a new URL. That’s why the how-to-improve-urls slug without numbers is a much better option. 

Static vs dynamic URLs 

There are two types of URLs: static (permalinks) and dynamic URLs. Static is the address that doesn’t change and doesn’t include URL parameters. 

It is a clean and easy-to-read URL: https://website.com/ultimate-seo-tools.html

Dynamic URLs result from the search of the site that is database-driven. Such addresses are generated by servers or CMS, and unlike static URLs, they are not user-friendly, and sometimes URLs with different parameters take a user to the same piece of content. Simply put, it may result in creating duplicate pages. 

Here is an example of a typical dynamic URL: http://www.website.com/p/google-checkout-php-sample-code/issues/detail?id=31

So, what URLs are better? Static ones are usually best for SEO purposes because: 

  • They have a higher CTR (click-through rate).
  • They usually include keywords.
  • Such URLs are easy to copy, paste, and remember.
  • They help a user understand what the page is about.
  • They can include an anchor text for links. 
  • It is usually easier for search engines to work with static URLs.

Note that a static URL doesn’t mean a good URL by default. It can be bad, too: 

www.website.com/article/bin/answer.foo/en/3/98971298178906/URL

A static address will work properly only if you make it clean and well-structured. 

However, sometimes users can’t avoid dynamic URLs. If you have an online shopping website with product lists and their status frequently changes, you have to use dynamic URLs. In this case, Google recommends creating nice-looking addresses. It means keeping them short and removing unnecessary parameters: http://www.example.com/?p=category2&article=page.

URL parameters

URL parameters

Let’s take a look at this example: http://website.com?serviceid=3865

“?” is where the parameter starts. “Serviceid” is the parameter itself. “=” is the characteristic of the service id, i.e., of the parameter. 

Why use URL parameters? They are generally used for tracking session IDs, to filter products by category, to identify where your ad traffic is coming from, and more. They can be important but incorrectly configured URL parameters can cause duplicate content and keyword cannibalization.

Multiple URLs with similar content

Though all addresses are supposed to be unique, often you have a few similar URLs. There are two ways to solve this problem:

1. You can redirect them with a 301 if you don’t really need to maintain the duplicate page. 

2. Or use a rel=canonical tag if you need to keep a slightly different version for some of your visitors. If you want to learn more about URLs with similar content, check out this guide

Why produce a standard form of a URL

Normalization is the process of modification and standardization of URLs. It helps eliminate duplicate URLs and thus prevent the indexing of duplicate pages by search engines. The idea is to express the URL in one way, for example:

  • A link to “/contacts.html” would be normalized to http://www.website.com/contacts.html
  • A link HTTP://WWW.WEBSITE.COM/contacts.html would be normalized to http://www.website.com/contacts.html
  • A non-trailing-slash (/) https://www.example.com/trip/ would be normalized to a non-trailing-slash URL https://www.example.com/trip
  • A double-slash URL http://www.example.com//path will be normalized to a single slash http://www.example.com/path

Webmasters also use redirects to normalize URLs and prevent duplicate pages that could exist between:

  • Non-www and www
  • HTTP and HTTPS

Summary

Although URL optimization in SEO may seem less important than content and page load speed, it still can affect your rankings. SEO-friendly URLs should be logically structured, comprehensible to users, short, and easy to share. Yes, there are a lot of things to consider, but once you learn how to create clean URLs, you will not lose this skill. Moreover, there are plenty of services that generate good URLs as well as SEO platforms that help recognize the existing problems with URLs and quickly solve them.

Subscribe to our blog!

Sign up for our newsletters and digests to get news, expert articles, and tips on SEO

Thank you!
You have been successfully subscribed to our blog!
Please check your email to confirm the subscription.