4 October 2023
Have you ever wondered what that string of text at the end of your WordPress post or page URL is? It’s called the slug, and it’s an important part of your WordPress SEO.
In this post, we’ll explain everything you need to know about WordPress slugs, including:
By the end of this post, you’ll have a good understanding of what slugs are, why they’re important, and how to use them effectively on your WordPress website.
A WordPress slug is the editable part of the URL that comes after the domain name and the permalink structure. It’s a unique identifier for a specific page or post on your website.
For example, in the following URL:
The slug is “make-money-blogging.”
Let’s break down the different parts of a URL to better grasp what a slug is. Take the URL of this post as an example.
From left to right, we have:
WordPress slugs are important for several reasons:
WordPress slugs and permalinks are two closely related concepts, but they are not the same thing.
A slug is the part of a WordPress URL that comes after the domain name and any subfolders. It is the editable part of the URL, and it is typically made up of lowercase letters, numbers, and hyphens.
A permalink is the full URL of a WordPress page or post. It includes the domain name, any subfolders, and the slug.
Here is an example of a WordPress permalink:
In this example, the slug is “best-cheap-wordpress-hosting.” The permalink is the full URL of the blog post, including the domain name and the slug.
Below are some examples of both good and bad slugs to illustrate the importance of choosing descriptive, user-friendly, and SEO-optimized slugs:
Example 1: “how-to-install-wordpress”
Reasoning: This slug is straightforward and tells users that the content is about installing WordPress. It’s also SEO-friendly because it includes keywords related to the topic.
Example 2: “best-free-wordpress-plugins”
Reasoning: This slug is concise and descriptive, providing clear information about the content of the page, which is likely a list of recommended free WordPress plugins.
Example 3: “best-free-wordpress-themes”
Reasoning: This slug is concise and descriptive, providing clear information about the content of the page, which is likely a list of recommended free WordPress themes.
Example 1: “article12345”
Reasoning: This slug is non-descriptive and lacks any keywords or context. It provides no information about the content to users, which can lead to a poor user experience and have a negative impact on SEO.
Example 2: “article-title-with-too-many-words-that-make-it-hard-to-read”
Reasoning: While descriptive, this slug is excessively long and contains unnecessary words, which can make URLs look messy and impact user experience. Shorter, more concise slugs are generally preferred.
WordPress, by default, uses the “Plain” permalink structure, as shown below.
Since the plain structure does not contain keywords, it is not an SEO-friendly structure.
Changing the default permalink structure is a vital step toward making your WordPress blog SEO-friendly. You may do so by going to Settings » Permalinks and selecting another option. We recommended “Post name” since it is the shortest slug option while still including relevant keywords.
Note: It’s important to change your permalink settings before launching your website, if possible. If you change your permalinks after your site goes live, you’ll need to set up redirects from your old URLs to your new ones. Fortunately, there are several redirect WordPress plugins available to help with this process.
Once your permalink structure has been updated successfully, you can edit the slugs of individual posts and pages on your site.
There are two ways to change a WordPress post slug: using the Gutenberg block editor or the Quick Edit feature.
If you are using the Gutenberg block editor way and want to change the slug before publishing a new post, click Save Draft. Once saved, click on the Summary section and click on the URL next to the URL option.
This will open a popup box. Now, make your changes in the Permalink field.
If you want to use the Quick Edit feature, simply click on the Quick Edit link below the post title.
Next, edit the post slug and click Update to finalize the new post slug.
As with a post, you can also change the slug for a WordPress page using the same editor or the Quick Edit feature. However, this time, you can go to Dashboard » Pages instead.
WordPress automatically generates a slug for each of your categories and tags, but you can also create your own slug. To edit a category slug, go to the WordPress dashboard and select Posts » Categories.
Select the category you want to change and click the Edit button. Now, type your new slug in the category slug field and click Update to save the change.
To change your WordPress tags, go to the WordPress dashboard and click on Posts » Tags. From there, repeat the same process we used for categories.
The URL of a web page is one of the elements that search engines use when deciding how to rank a page in search results based on its content.
If you want your website content to appear higher in search result pages and get more traffic, you should optimize the WordPress slug for SEO whenever you publish a new post.
Below are a few SEO tips to keep in mind while creating a new post or page:
Don’t try to target all of your keywords. Instead, put the target keyword you want to rank for in the slug. This will help both search engines and readers in determining what the content is about.
For example, the target keyword you’re targeting for a blog post is “On-Page SEO Checklist.” As a result, an ideal slug for that post is www.example.com/on-page-seo-checklist.
When composing slugs, use hyphens (-) to separate words instead of spaces or underscores. For example, use “best-seo-practices” instead of “best_seo_practices” or “best seo practices.”
Eliminate unnecessary stop words (e.g., “and,” “the,” and “in”) from your slugs. These words don’t add value and can make the URL longer and less SEO-friendly.
A good URL slug should not be too long. Long URLs are difficult to read and remember. Try to keep your slug to less than five words.
Furthermore, a URL that is too long will be shortened in Google search results. While this isn’t an SEO nightmare, it does make the page snippet look unpleasant.
Use lowercase characters for all slugs. This helps maintain consistency and prevents potential issues with case sensitivity in URLs.
This keeps your content from appearing outdated on your website, in search results, and elsewhere.
Exclude special characters or symbols that can confuse search engines or break the URL structure. Stick to letters, numbers, and hyphens.
If you ever change a slug for a published post or page, create a 301 redirect from the old URL to the new one. This ensures that users and search engines are directed to the correct content.
WordPress slugs are a fundamental aspect of website optimization. These concise, keyword-rich snippets not only impact your site’s search engine visibility but also influence user experience.
Crafting effective slugs that are both SEO-friendly and user-friendly is a skill worth mastering.
By following the best practices outlined in this guide, you can ensure that your website’s URLs are clear, relevant, and easy to navigate. With well-optimized URL slugs, you’re on your way to improving your site’s rankings, attracting more organic traffic, and creating a more seamless and enjoyable browsing journey for your visitors.
So, start optimizing those slugs and watch your website thrive!
We hope this article helped you learn everything about WordPress slug.
For more, check out these other helpful resources: