We rank vendors based on rigorous testing and research, but also take into account your feedback and our commercial agreements with providers. This page contains affiliate links. Advertising Disclosure
  1. Website Planet
  2. >
  3. Blog
  4. >
  5. What Is a URL Slug + How it Can Optimize Your Website

What Is a URL Slug + How it Can Optimize Your Website

Hendrik Human Hendrik HumanWebsite Development Expert
If you want to run a successful and effective SEO campaign for your website or blog, you’ll inevitably have to optimize your website slugs. Despite being such a simple method to optimize your website’s SEO, not many new website owners or administrators know what they are and how to use them.

The benefits of optimizing your website’s slugs to compete online can’t be understated. Good slugs do the following:
  • Make it easy to identify the content and value of your posts from the URL
  • Make your URLs more attractive and easily digestible by your website visitors
  • Make your URLs easy to remember and find again by website visitors
  • Improve your SERP (search engine results pages) performance by helping you rank higher in results

But What’s a URL Slug in the First Place?

If you go to a website and navigate to a specific webpage or blog post, you’ll see that the URL in your browser’s URL bar will look something like this:

https://www.example.com/blog/this-is-a-blog-post

 image1 11

The “path” is the part of the URL that comes after the actual website domain and domain extension — in this case, the “example.com” part. This “path” helps to illustrate where in the website hierarchy you’re at. Webpages or posts on a website are usually separated using a “/” in the URL.

The “slug” is everything after the last “/” in the path, and it usually identifies the actual file or webpage. So in the example above, the slug is:

this-is-a-blog-post

image3 4

There are multiple reasons why you might want to change the slug of your URLs:
  • You might want to shorten or lengthen the URL when using the post title
  • Some special characters (such as spaces) aren’t supported in URLs
  • You want to enhance the URLs to improve SEO performance (which is what I’ll help you do in this guide)

How to Use Slugs to Optimize Your Website SEO

How Search Engines Use Slugs

The cornerstone of any SEO campaign is targeting keywords. The whole basis of search engine optimization is built on the ability of search engines to match what people search with content on the web using relevant keywords.

For example, if a user searches for “Best hamburgers in New York”, a search engine like Google will scour the web for any articles or webpages that use or mention the same words and phrases. Often, search engines will also identify keywords like “hamburgers” and “New York” and pair them with related keywords for relevance, such as “food”, “diners”, etc.

If you take your website SEO seriously, you are no doubt already using these keywords in your posts and webpages to generate more traffic. The crux of optimizing your slugs for SEO comes down to identifying and using these same keywords in your URLs.

Search engines don’t only take into account the content of your posts or webpages; they also look at your URLs and other metadata to draw their conclusions on what webpages are the most relevant according to what a user searched.

So, let’s say that you have a long title for your post which reads something like, “The Best Hamburger Joints in New York for Those Who are Hungry and on a Budget.”

First, using only a date or ID for the post slug, as per the examples above, doesn’t give the search engine anything to work with. Second, using that entire title gives the search engine too much to work with that’s not relevant to what the user searched, which was only “Best hamburgers in New York.”

Therefore, shortening the URL by using almost exclusively the most important keywords (“hamburger”, “new york”) will yield the best results according to a relevance score. Your resulting URL might then look something like this:

www.example.com/blog/hamburger-new-york

How Humans Use Slugs

However, it’s not just search engines you want to impress. After all, the end-users and consumers of your content are people. If I’ve learned anything about people who surf the web (ourselves included), they want things short, simple, and crystal clear.

Humans excel at consuming and interpreting natural language, allowing you to avoid excessive simplification required for search engines. While the URL mentioned is optimized for search engines, it lacks sufficient information for human comprehension. Its brevity and oversimplification can even give the impression of minimal effort and disrupt fluent reading.

As humans, we are also attracted to emotive or qualitative language. That means including a word such as “best” or “fantastic” will not only fill out your slug nicely, but also attract more human visitors. With that in mind, we can improve our URL further by changing the slug to:

www.example.com/blog/best-hamburgers-new-york

Okay, So How Do I Actually Change My Slugs?

Good question! However, you may not be happy to hear that it varies from platform to platform. Almost any platform should provide a way for you to change the URLs of your posts and webpages on an individual basis. You then simply need to identify the “slug” part of the URL and then change it manually for every post or webpage.

Other platforms may provide recommendations, generate slugs automatically, or allow you to install plugins to manage your SEO aspects, such as the Yoast SEO plugin for WordPress, which is one of the most popular examples.

In Wix, you can change the slugs of your webpages or posts when editing your website by going to your individual webpage settings, going to the Page SEO options, and changing your webpage URL. On Squarespace, it works in a very similar fashion.

image2 4

To summarize, the steps for changing your slugs are as follows:
  • Step #1. Identify your most important keywords for a given post or webpage
  • Step #2. Arrange them in a way that makes sense and is both human- and machine-readable
  • Step #3. Change the slugs in URLs for specific posts or webpages to your new URL-friendly and search-engine-optimized versions
A final pro tip is to look at how you can use URL redirects on your website builder (usually through an app or plugin) to make sure that search engines don’t take visitors to your old URLs. Since your address has changed, users will encounter a “404 page not found error” if they are taken to your old URL. An example is the Simple 301 Redirects plugin on WordPress.

Short on time?
Take this one-minute quiz to learn which website builders are best for your project.
Find the Best Website Builder for Me >

URL Slug Best Practices

To really get the most out of your URL Slugs, it’s worth going over the best practices that generally apply no matter the circumstances or platform you’re using. Keeping these principles in mind will help you create effective slugs wherever and whenever:
  • Identify keywords. Identify the most important keywords in your post that will be the most relevant to visitors and search engines. (Use tools like keywordtool.io for this.)
  • Keep it focused. Scrap all unnecessary words as well as any “stop” words such as “the”, “as”, “and”, “a”, etc.
  • Keep it short. Keep your slugs as short as possible. It will depend on your keywords, but three or four words is the standard.
  • Don’t cram in keywords. While keywords are important, don’t just squeeze them in — you don’t want your slugs to make no sense at all.

A Small Tweak That Makes a Big Difference

Optimizing your slugs to be more search-engine friendly might seem too simple to be of any real use. However, its simplicity is one of the key reasons why it’s such an effective tool to rank your website in SERPs. It’s in a format that’s easy to read for both humans and computers, and it corresponds directly to your webpages and content.

Now that you know what slugs are, how they’re used, and some fundamental best practices, you have all the tools you need to optimize the slugs for your website or blog. Sometimes, winning the SEO race comes down to very small margins, which means every angle is worth exploring.

Rate this Article
4.8 Voted by 4 users
You already voted! Undo
This field is required Maximal length of comment is equal 80000 chars Minimal length of comment is equal 10 chars
Any comments?
Reply
View %s replies
View %s reply
Related posts
Show more related posts
We check all user comments within 48 hours to make sure they are from real people like you. We're glad you found this article useful - we would appreciate it if you let more people know about it.
Popup final window
Share this blog post with friends and co-workers right now:

We check all comments within 48 hours to make sure they're from real users like you. In the meantime, you can share your comment with others to let more people know what you think.

Once a month you will receive interesting, insightful tips, tricks, and advice to improve your website performance and reach your digital marketing goals!

So happy you liked it!

Share it with your friends!

Or review us on

199535
50
5000
87176
< Prev
 of 4
Next >
We recommend the following three website builders for your portfolio site
< Prev
Quiz results