Beginners to SEO may come across the word slug. Various articles refer to the post or page slug and the importance of optimizing it for better SEO, but what does this mean?
In this post, you will learn what is a post slug and why it is very 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 then each and every 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 are important for two main reasons:
- It’s one of the signals taken into account by search engines 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 when it comes to SEO and usability. In the SEO World, the process of optimizing the slug is the same as creating SEO friendly URLS.
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:
This is not SEO or user friendly, so the first thing you need to do is 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 a number of 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 make sure that your slugs are optimized for SEO.
When you create a new post (or edit an existing one), WordPress allows you to edit the slug of a page or post.
As you can see in the screenshot below, there is an EDIT button next to the permalink of each page.
When you click EDIT, you can make changes to the slug and optimize for both users and search engines, using the guidelines below.
Note: Optimizing the slug is not a task for WordPress users only. You should try and optimize your slugs on other platforms as well.
How to optimize your Slug?
Now that it’s clear what a slug is and why it is very important for SEO, let’s see how to best optimize it.
Include keywords you want to rank for
Help Google and other search engines understand for which keywords you want to rank for the particular page or post, by including those keywords in the page slug.
For example, let’s say that you want to rank for the keyword “Asparagus Health Benefits” and you wrote a post with title “10 Amazing Health Benefits of Asparagus You Should Know About”.
WordPress by default will create this slug: “10-amazing-health-benefits-of-asparagus-you-should-know-about”.
It’s not that bad but it’s long and includes many words and that 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 to understand by users and gives search engines a big clue on the content of the page and the keywords you want to rank for.
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 in understanding the actual content of a page.
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.
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.
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 the fact 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 the 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 that has an exact match slug, has a small advantage over other pages with slugs that are not exact match.
Of course, this is not the only factor taken into account during the ranking process. This one is actually of low importance.
Finally, don’t forget that the URL of a page is shown in the search results so short and descriptive slugs, will encourage more clicks and visits to your website.
Use only lowercase characters
This is also common practice but worth mentioning again. Avoid having Capital characters in your slug but 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.
A slug is the part of the URL that is unique for each and every page of a website.
When creating a new page or post, you should spend some time to optimize your slug by including the keywords you want to rank for and by 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, then this is the same as changing the URL and this means that you should add 301 Redirections (to redirect old URL to New URL), otherwise the change may have a negative impact on your SEO.