Beginners in SEO may come across the word slug. Various articles refer to the URL or page slug and the importance of optimizing it for better SEO, but what does this mean?
In this post, you will learn what a URL slug is and why it is important for SEO.
What Is a Slug?
A slug is the part of the URL that uniquely identifies a page and it’s in a format that is easily readable by both users and search engines.
For example, let’s take all the URLs that belong to this domain (reliablesoft.net). All URLs start with reliablesoft.net, and each page or post of the website has a unique slug.
This is the part that comes after the “/”.
Example 1: https://www.reliablesoft.net/diy-seo-tutorial-for-beginners/ -> The slug is “diy-seo-tutorial-for-beginners”.
Example 2: https://www.reliablesoft.net/search-engine-marketing/ -> The slug is “search-engine-marketing”.
Example 3: https://www.reliablesoft.net/h1-tag/ -> The slug is “h1-tag”.
The domain of a website and the slug make up the URL (Uniform Resource Locator) of each and every page.
The URLs for all pages published on the Internet are unique. No published page can have the same URL as another page on the Internet.
Why Are Slugs Important?
Slugs (also referred to as permalinks) are important for two main reasons:
- It’s one of the signals search engines use during the ranking process. They read the slug and try to understand what a page is about.
- Easy-to-read slugs help users identify what content to expect for a page.
For example, the slug of this page https://www.reliablesoft.net/what-is-off-page-seo/ is “what-is-off-page-seo”, which tells users exactly what kind of information they should expect to find on that page.
Optimizing your slugs will give you an advantage in SEO and usability. In SEO, optimizing the slug is the same as creating SEO-friendly URLs.
How To Optimize Your URL Slug For SEO?
Follow these best practices to write better slugs for SEO.
1. Include Keywords You Want To Rank For
Help Google and other search engines understand which keywords you want to rank for the particular page or post by including those keywords in the URL slug.
For example, let’s say you want to rank for the keyword “Asparagus Health Benefits,” and you wrote a post titled “10 Amazing Health Benefits of Asparagus You Should Know About”.
Most CMS will create this slug: “10-amazing-health-benefits-of-asparagus-you-should-know-about” by default.
It’s not that bad, but it’s long and includes many words, which can confuse Google and users.
What you can do to optimize it is to edit the slug and make it “asparagus-health-benefits”.
This is shorter, easier for users to understand, and gives search engines a big clue about the page's content and the keywords you want to rank for.
2. Consider Removing Stop Keywords
As part of the optimization process, you should consider removing stop words from your slugs. These are common words that don’t add any value or help readers understand the page's actual content.
For example, words like “a”, “the”, “on”, “and”, “is”, “of”, “you” and other similar words.
If you take another look at the above example, you will notice that I have removed these to make my slug cleaner and shorter.
3. Use Dashes to Separate Words in a Slug
This is common practice these days but as a reminder, you should separate words in a slug using a “- “and not any other character.
4. Keep it Short
Shorter slugs are easier to understand and faster to process than longer slugs. This “asparagus-health-benefits” is definitely better than this “10-amazing-health-benefits-of-asparagus-you-should-know-about”.
Another reason for keeping your slugs short and without stop keywords is that search engines, during the crawling and indexing process, are trying to match what the user has typed in the search box with page slugs.
If they find an ‘exact match,’ then the particular page has an added advantage over other pages that may use longer slugs.
For example, if the user is searching for “asparagus health benefits,” my page with an exact match slug has a small advantage over other pages with slugs that are not exact matches.
Of course, this is not the only factor considered during the ranking process. This one is actually of low importance.
Many more important factors are used, but since SEO is about optimization, you should try to optimize your slugs.
Finally, don’t forget that a page's URL is shown in the search results, so short and descriptive slugs will encourage more clicks and visits to your website.
5. Use Only Lowercase Characters
This is also a common practice but worth mentioning again. Avoid using Capital characters in your slug, and use only lowercase letters.
The reason is that webservers like Apache (used by WordPress and other popular CMS), inteprept this: http://www.example.com/My-Page-Slug to be a different URL than this: http://www.example.com/my-page-slug or this http://www.exampe.com/My-page-slug.
How To Configure URL Slugs In WordPress
It should be noted that the word slug emerged from the WordPress community. You can configure your slug under Permalink Settings.
When you install WordPress for the first time, the URLS may look like this:
http://www.example.com/?p=123
This is not SEO or user-friendly, so you first need to configure WordPress to use the post name as the slug instead of serial numbers.
When you go to SETTINGS / PERMALINKS, you will be presented with several options, as shown below.
The best approach is to select the Post Name so that your post slugs will include the post name separated by dashes.
That was a great first step, but there is one more step to ensure that your slugs are optimized for SEO.
When you create a new post (or edit an existing one), WordPress allows you to edit the page or post's slug.
As you can see in the screenshot below, there is an EDIT button next to each page's permalink.
When you click EDIT, you can change the slug and optimize it for users and search engines using the above guidelines.
Conclusion
A slug is the part of the URL that is unique for every page of a website.
When creating a new page or post, you should optimize your slug by including the keywords you want to rank for and excluding stop words. Keep your slugs short and descriptive, use dashes as the word separator, and use only lowercase characters.
Important: If you decide to change the slug of an existing post, this is the same as changing the URL, which means that you should add 301 Redirections (to redirect the old URL to the New URL). Otherwise, the change may have a negative impact on your SEO.