A slug is a keyword-rich URL that is used to identify a web page.
It is the part of the URL that comes after the domain name, for example, “www.example.com/this-is-a-slug” or “www.example.com/a-different-slug.”
It should be easy to read and explain the content on a page.
Default slugs are usually a long stream of random letters, numbers, and symbols, however, a slug optimized for SEO should consist of keywords and phrases that are relevant to the content on the page,
This can help search engines find your page more easily when someone searches for those terms.
The slug of a page URL is important because it is one of the signals that search engines, like Google, use to understand what a page is about and determine its ranking for search queries.
Thus, the slug needs to make sense to both users and search engines.
Optimizing your slug for SEO is important because it builds credibility.
A link with a long string of random characters or meaningless terms looks untrustworthy and may discourage users from sharing or linking to that URL as well as search engines.
Simple-to-read slugs help users identify a page’s content.
For example, the slug of this page https://www.mihaelcacic.com/seo-glossary/slug/ is “slug”, which effectively explains to users what kind of information they can find on this page.
As a result, whether a user chooses to click on your link depends on your page’s URL, including its slug.
Creating a good custom slug for your page or post can be a great opportunity to include your keyword in the URL.
The main SEO benefit of a slug is that you can change the words to make sure that it contains the words that you want to rank for and, even though the reader might not grasp the implication, a search engine will include that keyword in your ranking results.
This is an untapped source of keyword ranking potential.
1. Use the best practices for slug characters
These are some best practices for slug characters you should be using:
- Use lowercase characters: keeping all letters in slugs in lowercase prevents issues with duplicate content, typos, and 404 errors when case sensitivity is prevalent.
- Use hyphens to separate words: Browsers turn any spaces in URLs into percentage characters like “%20”. Use hyphens, dashes, or underscores to separate words and make them easier to understand.
- Do not use special characters: Avoid using any special characters in your URL slug besides dashes to denote spaces. In URLs, many characters have unique meanings and may appear differently or cause issues.
- Include a Trailing Slash: The “/” at the end of a URL slug is known as a trailing slash. Using this slash looks better and is an indicator of a complete URL the same way .doc does for a DOC URL.
2. Make slugs relevant to your page’s content
Slugs should accurately reflect the content on your page.
Search engines will prioritize your content for relevant search queries if your slugs are relevant.
A common strategy is to match your slug and H1 header. That is typically the title of the product; for blog content, it is the title of the blog post.
However, be careful when doing this. If you copy the title, your slugs might end up being excessively long or adding unnecessary context if you ever update the page’s content. The key is to focus on the target keyword.
You should aim to create a slug that gives readers an accurate idea of what the page is about but can be optimized further.
3. Keep URL Slugs Short
A URL slug should be three to five words in length.
Short slugs are easy to remember and are less likely to be broken by users. It is also easier to share on social media sites with character restrictions.
4. Remove Function Words where possible
Function words or stop words are words that signal a grammatical relationship in a sentence but offer no lexical meaning.
Examples of stop words are “a”, “the”, “on”, “and”, “is”, “of”, “do”, “you” and other similar words.
These words don’t add any value or help in understanding the actual content of a page.
It is important, however, to always maintain the readability of your slug.
While removing function words may shorten a URL, it may also remove so much context that the reader loses understanding of the slug.
Always prioritize the reader when deciding between a more reader-friendly option and a keyword or shorter URL.
5. Use your target keywords in your URL Slugs
Optimizing slugs with keywords is a great strategy to take advantage of. However, you should know that keywords in URLs help a little but are not essential for ranking.
If you want to incorporate keyword-based slugs in your SEO strategy, remember to follow best practices guidelines like
- Choose relevant keywords
- Avoid keyword stuffing
- Aim for long-tail keywords, etc
6. Create timeless slugs
Ensure that you create slugs that never go out of date. For example, avoid adding dates as doing this can make your content outdated in the future – unless the content is for a one-time event landing page.
Also, avoid long slugs with a lot of descriptive contexts. Such slugs may lose relevance if the content is ever changed or updated. This is why you should pick a general target keyword to use.
Keeping your content up-to-date is an essential part of keeping your site current for SEO purposes.
7. Examine the architecture of your website
Slugs are characterized by the fact that each one is unique and can only be used once. The only exception is if the URL path contains a different component, such as a different category.
It is therefore best to take into account a page’s context within your website architecture to ensure that the appropriate slug is being used in the appropriate location.
It wouldn’t be a good idea to use a slug for a blog only to find out later that it would be more suitable for one of your products or product categories.