Best practices for SEO-friendly URLs
It’s a topic that remains up for discussion: SEO-friendly URLs. Should you include the category? Do you want to keep the URL as short as possible or is there room for extras? Is it smart to stuff your URL with keywords? First of all, it’s good to know that the best practices for SEO-friendly URLs can differ per website type. There are, however, a few ground rules that you can keep in mind when setting up your URLs. In this post, we’ll explain our take on URLs and elaborate on why we think that this is the best option for your links.
URL is an acronym for Uniform Resource Locator, but you won’t have to remember that. It’s simply the address of a unique resource on the web that you can also use to navigate to that resource right away. A simple example is the URL https://www.google.com/ that takes you to Google’s search page. URLs are not exactly the same as slugs. The slug is actually the part of a URL that identifies a particular page on a website. An example is the URL https://yoast.com/keyword-research/ where the slug is ‘keyword-research’.
A few ground rules for SEO-friendly URLs
Although best practices can depend on the kind of website you have, there are a few ground rules when it comes to creating SEO-friendly URLs:
- Make sure that your URLs are focused. They shouldn’t contain function words like ‘a’, ‘of’, ‘the’ etc. In 99% of the cases, these words add nothing of value to your URL. If possible, strip your URLs of verbs as well. Words like ‘are’ or ‘have’ are not needed in your URL to make clear what the page is about.
- Although you want to keep your URL focused, try to keep it readable enough to give people an idea of what they can expect when they click on your link.
- Use hyphens to separate words in your slug. Don’t use spaces, underscores or other characters of your choice to do this.
- There isn’t really an ideal length for your URL, but we do recommend to keep your URLs as short as possible. It’s not that Google doesn’t like lengthy URLs, but shorter URLs are more focused and easier to recall. In addition, they will be less likely to be cut off when shown in Google. It’s also good to keep in mind that if you use breadcrumbs on your site, as we do, these could appear in Google’s results instead of the full URL:
Now that you’re aware of the ground rules, let’s look into the best practices per type of website. Because there are different factors to consider, depending on your website. We’ll discuss how to create SEO-friendly URLs for:
SEO-friendly URLs for company websites
If you have a static website that provides people with information on your company and services (without an online shop or blog page on it), we would recommend going with the shortest URL possible. For all of your pages. This makes it easy for people to revisit these pages and keeps your URLs clean and clear. When you have a company website, it’s best to keep it simple and not create unnecessary long URLs.
SEO-friendly URLs for online shops
If your website is or has an online shop, you have two options when it comes to the URLs of your product pages:
There are actually a few content management systems (like Magento) that automatically create both URLs when you create a product page. If that’s the case on your website, you can use rel=canonical to point Google to the one you want to appear in their search results.
However, the question still remains what URL structure you should use. When it comes to an online shop, you can use your URLs to tell visitors more about your product range. For example, if your shop contains categories that make your visitor’s life easier, by all means, include these categories in your URL as well. That way your URL, breadcrumbs, and menu will tell the visitor where they are on your website and what else they can expect to find:
As you can see from the example above, the categories included in the URL give an idea of the other products that someone can find on that particular website. Of course, you need to decide for yourself whether you feel that your categories add that value to the URL. If so, it’s also better for SEO to include the category, as category and product are very much related and this will help Google understand your pages even more.
SEO-friendly URLs for blogs or news sites
When your website is a blog or news website, there are a number of ways to construct your URLs. Let’s go over them one by one:
If your site as a whole has one central and strong theme, you could consider focusing on the post title alone to create an SEO-friendly URL. The coherence of your content will indicate the main topic of your website to Google, so there will be no need to add that to the URL.
When your website is a news website on which you’re writing about different topics, adding the topic (for instance as a category name) is a good idea. This will help site visitors and Google understand what the page is about. The logic behind that is similar to the logic behind product page URLs (as explained above). The category name gives people more context and an idea of other news that they can expect on your website.
If your website features daily news and the news is related to a date, you can choose to include that date in the URL as well. If someone is looking for the latest news on Apple’s products, the date in the URL will show someone if the page is about this year’s iPhone or not. However, it is good to note that the URL is often not shown in the search results and that Google can sometimes show a original publish date (regardless of when you’ve done the last update). So, although a date in your URL will likely not impact your SEO, you should consider whether it serves your site visitors.
Although there are a few ground rules, there is not one correct way to create the best SEO-friendly URL. It depends on your website and content. Especially with a blog or news site, there are multiple options to consider. The main takeaway is to keep your URLs focused and to keep your audience in mind. Besides that, make sure to include all the information that’s important to make clear what the page is about.
If you’d like to learn more about best practices in SEO, our all-around SEO training course can help you with that. In this course, you’ll get practical tips on how to rank higher and get more visitors to your website!
Read more: What is a slug and how to optimize it? »
Coming up next!
WordCamp Phoenix 2023March 24 - 25, 2023 Team Yoast is at WordCamp Phoenix 2023! Click through to see who we'll be there, what we'll do there and more! See where you can find us next »
Yoast SEO news webinar - March 28, 202328 March 2023 Our head of SEO, Jono Alderson, will keep you up-to-date about everything that happens in the world of SEO and WordPress. All Yoast SEO webinars »
22 Responses to Best practices for SEO-friendly URLs
Thanks from this post I learned how to make url properly which will help me to rank well.
Thanks Khushi, it’s nice to hear you found the post useful!
Thanks! Great tips.
You’re welcome, Emily!
Awesome Contents. I will sure put the knowledge in My blog
Thank you and good luck with your blog!
why is it so difficult to find backlink having spam score less than 5,
Hi there! We actually have a blog post on how to set up a successful link building strategy in 6 easy steps that might be able to help you!
Hi Camille, This blog was very helpful for me in planning the URL structure for various pages on my website. Thank you for sharing
Great to hear! Good luck with your URL structure :)
Great Article. Thanks for sharing this Camille.
You’re very welcome!
Thanks for this helpful info about urls. My question: why the need for hyphens between each part? If I’m a public speaker, I want to have an elegant and easy way to send people to a registration page and I can’t have hyphens for that. So maybe for content, use the hyphens, and then for events keep it short, sweet, with no hyphens? What do you think?
Hi there Connie! The hyphens act as spaces between your words in an URL and Google actually also views these hyphens as word separators. That’s why we recommend using them, so that Google (and your users) understand what your page is about. That being said, keeping your URLs short is always a good idea :) so you could choose to create URLs like: http://www.website.com/eventname
But if your event name is more than one word, I would consider use hyphens in your URL.
I thought urls with seo/keywords didn’t help any these days and was only something that helped initially with search engines. Is seo with urls a thing again? Was what I read heresay?
Hi there! Adding your keyword to your URL can help Google determine what your page is about, but there are also lots of other things that Google looks at to determine that. So I would suggest adding your keyword when this can be done naturally, but don’t force multiple variations of it into your URL. Always put your user first, and your user benefits from a clean and readable URL :)
Great article, and along those lines I have a question for our local business. We are a plumbing company in Dallas, and we serve easily about 20 cities, so we have a script that updates the menu per location when you are there. The question is… We are located in Allen Tx, but it’s not the biggest area we serve. In the URL, should we choose the domain only without a slug, and have all of those be the Allen pages? Or is it better to create the domain with the slug of /allen/? We are not getting the ranking I think we should not using the /allen/, but what do we do with the non-slug urls?
Hi there! Thanks for your comment :) Unfortunately, I’m not quite sure what you mean. Could you elaborate on your question?
Thanks for this article Camille.
If there is one thing I have learned when writing URLs is to properly categorise your URLs.
You’re welcome! And you’re right, it’s important to be mindful about your URLs :)
Thanks for sharing this article. The rules explained in this article for proper SEO practices, have guided me properly. I hope this will help me to make my business more productive.
You’re very welcome, Anne! Good luck with your website and business :)