What Is a WordPress Slug: How to Change It and Optimize for SEO

A WordPress slug is the part of a URL that identifies a specific page or post on a website. It is the part of the URL that comes after the domain name. For example, in the URL https://example.com/my-post, the slug is “my-post”.

You can change the slug of a post or page in WordPress by editing the permalink. To do this, go to the post or page you want to edit, click the “Edit” link next to the permalink, and enter the new slug.

When creating a slug, it’s important to make sure it’s optimized for SEO. This means using keywords that are relevant to the content of the post or page. It’s also important to make sure the slug is short and descriptive. This will help search engines understand what the page is about and make it easier for users to find it.

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.

A slug is a customizable part of a URL located after the domain name. WordPress automatically generates slugs, which you can modify at any time.

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.

WordPress permalink settings

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.

The save draft button on WordPress editor

For Gutenberg block editor users, open the Permalink section and make your changes in the URL Slug box.

A WordPress slug example for posts

With the classic editor, the Permalink is available under the Post Title. Click Edit to change your post slug.

A WordPress slug classic editor

Another option is to change your post slug using the WordPress dashboard’s Quick Edit feature:

  1. Head to Dashboard -> Posts -> All Posts and click on the Quick Edit button under the blog post.
  2. Edit the post slug and click Update to finalize the new post slug.
WordPress quick edit for slugs

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:

  1. Head to Dashboard -> Posts -> Categories.
  2. 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.
WordPress quick edit for slugs

To edit a published category slug, follow these steps:

  1. Click on the Quick Edit button under the category.
  2. Make your changes on the Slug section and click Update Category.
WordPress quick edit for categories slug

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:

  1. Head to Dashboard -> Users -> All Users.
  2. Choose the user and click Edit.
  3. Find the Edit Author Slug section. Choose the Custom option to customize it accordingly.
  4. Click Update Profile to save the settings.
WordPress edit author slug

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”.

Hostinger Blog example

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.

Use Redirects

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.

Pro Tip

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.

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.

What Is a WordPress Slug? How to Change It and Optimize for SEO

A WordPress slug is a text that appears in the URL of a WordPress post or page. It is used to identify the post or page in a user-friendly and search engine friendly way. The slug is usually derived from the title of the post or page, but it can be manually edited to make it more descriptive and optimized for SEO.

What Is a WordPress Slug?

A WordPress slug is a text that appears in the URL of a WordPress post or page. It is used to identify the post or page in a user-friendly and search engine friendly way. The slug is usually derived from the title of the post or page, but it can be manually edited to make it more descriptive and optimized for SEO.

How to Change a WordPress Slug

To change a WordPress slug, go to the post or page editor and look for the “Permalink” section. Here you can edit the slug to make it more descriptive and optimized for SEO. Make sure to click the “Update” button after making changes to save them.

How to Optimize a WordPress Slug for SEO

When optimizing a WordPress slug for SEO, it’s important to make sure that it is descriptive and contains relevant keywords. It should also be short and easy to read. Additionally, it should be unique and not contain any special characters or spaces.

By following these tips, you can ensure that your WordPress slug is optimized for SEO and helps to improve your website’s visibility in search engine results.

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet and extranet products.



Developer Center




[email protected]