What Is a WordPress Slug: How to Change It and Optimize for SEO
WordPress uses a slug to identify different posts and pages. Optimizing every WordPress slug in your website can improve user experience and rankings on search engine results pages (SERPs).
This article will explain what a WordPress slug is and the steps to change and optimize it.
What Is a WordPress Slug?
A WordPress slug is a part of a URL that identifies a specific page or post on a website. It is the user-friendly version of a post or page’s title and appears after the domain name. Slugs should be short, descriptive, and relevant to the content they represent.
How to Change the Post Slug in WordPress
Changing the default website slug helps visitors and search engines understand your content better. When editing slugs, WordPress will follow these two basic rules:
- Replace spaces with dashes
- Only use lowercase letters
To customize the default slug in WordPress, head to Dashboard -> Settings -> Permalinks. Under Permalink Settings -> Common Settings, choose the best permalink structure for your content.
If you choose Custom Structure, you can select multiple settings for the permalink makeup.
Important! We recommend setting the slug before publishing your first blog post or page.
There is also the option to change the slug on your posts, pages, categories, tags, and authors.
How to Change the WordPress Post Slug
Changing your post slug can be done on the WordPress text editor or using the Quick Edit feature on the dashboard.
If you want to change the slug before publishing a new post, click Save draft. This step is the same with Gutenberg and classic editors.
For Gutenberg block editor users, open the Permalink section and make your changes in the URL Slug box.
With the classic editor, the Permalink is available under the Post Title. Click Edit to change your post slug.
Another option is to change your post slug using the WordPress dashboard’s Quick Edit feature:
- Head to Dashboard -> Posts -> All Posts and click on the Quick Edit button under the blog post.
- Edit the post slug and click Update to finalize the new post slug.
How to Change the WordPress Page Slug
Changing the website slug for a WordPress page can also be done using the editor or the Quick Edit feature. The same steps as editing post slugs apply, except you should head to Dashboard -> Pages instead.
How to Change the WordPress Tag and Category Slug
Every WordPress category and tag has its own slug.
Here are the steps to customize the slug of a new category:
- Head to Dashboard -> Posts -> Categories.
- Under Add New Category, fill out the Slug section to create your own. WordPress will automatically use the category name as its slug if you leave the section blank.
To edit a published category slug, follow these steps:
- Click on the Quick Edit button under the category.
- Make your changes on the Slug section and click Update Category.
The process is the same with WordPress tags. But instead, you must head to Dashboard -> Posts -> Tags to customize tag slugs.
How to Change the WordPress Author Slug
A WordPress website with multiple authors can customize the original slug for better consistency.
By default, WordPress will use the username as the author slug. With the right plugin, such as Edit Author Slug, you can change and optimize it.
Follow these steps after installing and activating the plugin:
- Head to Dashboard -> Users -> All Users.
- Choose the user and click Edit.
- Find the Edit Author Slug section. Choose the Custom option to customize it accordingly.
- Click Update Profile to save the settings.
Keep in mind that authors must create a user account first before editing the slug.
How to Optimize WordPress Slugs for SEO
Optimizing every slug in your WordPress website can help improve rankings on SERPs and drive more traffic.
Here are some search engine optimization (SEO) tips for your slug URL:
Target Your SEO Keywords
Search engines and readers look at the URL to determine the WordPress page’s content. Therefore, including the focus keyword is an essential slug SEO method.
For example, the focus keyword you’re targeting for a blog post is “best hosting providers”. Therefore, an ideal slug for that post is www.example.com/best-hosting-providers.
Keep It Simple Yet Descriptive
A post slug does not have to be as long as its title. Keeping your slugs short makes them more user-friendly, improving the chances of ranking higher in SERPs.
Take a look at our Hostinger Blog post as an example. Although the post title is “World Photography Day 2022: 4 Lessons From Photographers On How They Went Pro”, the SEO slug is simply “world-photography-day”.
Remove Unnecessary Words
Deleting unnecessary words from your slugs can make them more readable. If readers can still understand the slug without certain words, exclude them.
For example, remove pronouns and prepositions like: a, the, to, on, in, and at.
Avoid Using Dates and Numbers
Always consider how your slug will look like as time passes. Although updating the post name and content is possible, changing the slug can influence traffic and rankings.
Therefore, avoid using dates and years to keep the content evergreen. Using numbers can also be tricky as it may change in the future.
For instance, instead of using “8-ways-to-make-money-online-in-2023” as your slug, we recommend changing it to “make-money-online” instead.
Changing the slug after publishing the post or page will change the whole URL. So, users and search engines might not find the new slug without redirection. Using a redirect can also help avoid broken links on your website.
Use a plugin like Redirection to set up 301 redirects for posts and pages.
Check out what WordPress managed hosting plans Hostinger has to offer. All plans include an SSL certificate, multiple data centers, and dedicated support. You’re one click away from fast, secure, and scalable WordPress hosting.
A slug in WordPress is a customizable part of a URL. It helps direct visitors and search engines to understand your content better.
This article has explained how to change the slug for your WordPress page, blog post, category, tag, and author.
We have also shared ways to optimize slugs by including focus keywords and keeping them short.
Learn More About WordPress
What is WordPress
Guide to WordPress Security
How to Change Username in WordPress
How to Install WordPress
Guide to WordPress Widgets
How to Login to WordPress
How to Use SMTP in WordPress to Send Emails
How to Make a WordPress Site Live
Frequently Asked Questions about WordPress Slug
In this article, we have discussed what is a URL slug and ways to change and optimize it. Here are some frequently asked questions to understand the topic better.
Why Is URL Slug Important?
A URL slug in WordPress can direct visitors and search engines to a specific web page. In addition, a page and post slug can help explain your content better.
What Is the Difference Between a Slug and a Permalink?
Permalinks are permanent URLs of your web pages. They often consist of the domain and the slug.
For example, if a page’s permalink is https://www.example.com/focus-keyword, then the slug is focus-keyword.
Depending on your permalink structure, it can also include dates and categories. Therefore, it is possible to have two posts with the same slug but different permalinks.
How Important Is Slug for SEO?
Writing a good slug is essential for WordPress SEO as it influences user experience and rankings. By customizing the page and post slug in WordPress, you can include the focus keyword to rank higher in SERPs.