What is a URL Slug?
The URL slug is the part of your web page’s address that comes right after the domain name. It tells search engines where to find your web page. Think of a URL as an address. Imagine the domain is the apartment building and each page is a different apartment. The URL slug would be the apartment number. Just like home addresses, unique slugs help avoid confusion when someone is looking for your place. Slugs give a web page a unique name. This convention helps prevent one page from conflicting with other pages in the same site category.
What’s more, URLs are one of the first thing Google examines to see if a page is relevant to what someone is searching. Since Google has to examine millions of pages in fractions of a second, using optimized slugs can help Google interpret and rank your page faster. For this reason, we recommend using your target keyword in the slug.
Every page on a website must have a unique slug. Let’s take a deeper look at slugs using our INK blog as an example.
The site-wide domain name of our site is blog.inkforall.com. However, if you visit each page on our website, you’ll see that each one has its own unique URL slug:
In a nutshell, slugs help make it easier for search engines and people to understand what your page is about, even without seeing the page. They also help differentiate your pages from one another, which is crucial for your SEO.
In this article, we will teach you how to create and optimize your URL slugs.
Why is it Called a URL Slug?
Slug is a term born in the publishing and media industry. It refers to articles and news that are yet to be published. Usually, journalists use keywords as their slugs to quickly determine the content of their articles. WordPress is the first content management system to use the slug language rule as a way to describe individual pages in a WordPress site.
Most CMS solutions don’t use readable or coherent words in their URLs. For instance, by default, WordPress only generates identification numbers for each post like in the image below:
As you can see, these numbers don’t tell you much about the page. This makes it harder for both human readers and search engine crawlers to get valuable information about the page.
In addition to helping potential visitors and search engines identify your page more easily, using optimized URL slugs offers several benefits.
Benefits of Using URL Slugs
1. Avoid Ranking Cannibalization
Unique URL slugs help search engines tell the difference between the different pages on your site. A slug gives a web page a unique name, almost like a title or a name tag.
Just like home addresses, unique slugs help avoid confusion when someone is looking for your place.
Therefore, slugs can help prevent pages in the same site category from competing with each other for ranking positions.
This will help ensure your own pages don’t compete against each other for the same ranking position. Or, in other words, you don’t cannibalize your own traffic.
2. Improve SEO
Another reason to use slugs for your website is to help increase your search engine rankings and traffic. You can do this by using target keywords as your page slug.
If you look at your unpublished page details, you will notice that you have tags attached to the URL, including those not used frequently. You can eliminate these unnecessary tags by replacing them with relevant terms.
Meaning, a slug could help people understand what your page is all about and if it is relevant to their query. And that’s by just looking at your page address.
Clean, optimized slugs help communicate a lot of information in a small amount of space. They are almost like a summary of your page before a person even clicks on it.
If the slug looks relevant, a person is more likely to click on the link and visit the page. This can help improve your engagement and traffic.
For instance, a person looking for pet food is more likely to click on a link that has “pet shop” on its URL. It’s an effective way to show that your page matches people’s search intent.
But beware: Just like keyword stuffing isn’t effective anymore, simply using a competitive keyword in your slug isn’t enough to improve your rankings.
The reason that keyword stuffing doesn’t work anymore is because Google’s algorithm is able to understand the ideas behind the words on the page.
If what’s in your slug doesn’t match what’s on your page, then this optimization best practice won’t be very effective. In the same way a title represents what the content is about, the slug should also represent the page’s main idea.
Therefore, be sure to only use terms related to your content when defining your slug.
Otherwise, your page could be reported as spam and be penalized by search engines. That’s the opposite of what you want. That means no rankings and no visibility to audiences.
3. Increase Shareability
What’s more, keeping slugs short makes it easier for people to copy, share, and remember web page addresses.
They also help your page become more accessible from other pages or Internet browsers.
Simply put, URL slugs ensure that you and other people always have a way to get to your website quickly and easily.
How to Optimize URL Slugs
These are the top two best practices for optimizing a URL slug:
- Keep it short
- Use your target keywords
1. Keep it Short
There is no limit on the number of words that you can use in your slug. However, if you want to maximize its effectiveness, you have to keep it short.
Make it brief and use words that will provide the information people need. As much as possible, keep its length between three and five words.
Google is amazing because it is able to analyze and rank so many pages in so little time. Keeping slugs short helps make Google’s job a little easier.
“If you have got a three, four, or five words in your URL, that can be perfectly normal. As it gets a little longer, then it starts to look a little worse. Now, our algorithms typically will just weight those words less and just not give you as much credit.”
2. Use Target Keywords
Another way to optimize your slug is by using target keywords. This helps spoon feed Google the information it needs to help determine if your page is relevant to what someone searches.
Since URLs are often one of the first thing Google checks out in ranking a page, this approach helps take some of the guesswork out of prioritizing your page.
Also, you might have plenty of keywords to choose from, but it’s crucial that you only use the “right” ones. This means opting for keywords that best represent what your content is about.
Remember: Relevancy is one of the most important ranking factors.
Make sure that you do thorough keyword research using a reliable tool like KWFinder.
The “right” keyword will have the following characteristics:
- highly-relevant to what the content is about
- healthy monthly search volume
- appropriate ranking difficult for your domain authority
Also, take note that target keywords don’t always have to be one or two words long. The shorter the better, but you can also use long-tail keywords like Related Questions.
These can help make sure your content is as relevant as possible to what real people are searching in Google. In general, shoot to keep slugs under five words, but relevancy to your topic is priority.
URL Slug vs. Permalink
A permalink refers to a group of terms used as a web address for a section of a site. In WordPress, it refers to the entire URL of your webpage.
The image below is an example of a permalink:
As you can see, it contains the domain name of the website, followed by the slug.
By default, WordPress permalinks come with short IDs as post slugs.
But, you can customize the structure of your URL by editing the short ID or slug. Remember: you can shorten it and replace it with keywords that are relevant to your target audience.
After publishing your post, your permalink becomes permanent. Meaning, you can no longer change it, especially if months have already passed.
Changing your permalink structure right after publishing your content could lead to a broken link (404 error), which is not good for your SEO.
Keep these main points in mind before you create or make any changes to your URL.
- A well-optimized slug helps people and search engines quickly understand what your page is about
- Keep your slug short to increase shareability and make Google’s job easier
- Only use keywords relevant to your content to make your page more likely to rank for related searches
- Clean slugs can help provide the information your target audience needs with just a quick glimpse of your permalink.
- Your URL slug is vital to your SEO strategy. Therefore, you need to make sure that each page on your website has a unique one.
- Using the same slug on different web pages might create duplicate content. Note that duplicate pages are often ignored by Google and other search engines