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:
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:
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:
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 are also much better at consuming and interpreting natural language. That means you don’t have to simplify things as much as you would for a search engine. The URL above may look great for search engines, but it doesn’t give much info for an actual person to work with. It’s also so short and simplified that it almost looks lazy and doesn’t read fluently.
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:
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.
InWix, 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.
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.
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.