Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

What is: Post Slug

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

In WordPress, the post slug refers to the part of a web page’s address that appears after the domain name.

A simple WordPress slug example would be if you visited a blog post at www.example.com/blog-post, then “www.example.com” is the domain name, and “blog-post” is the post slug.

By default, the slug of any post you publish will be the same as the title, only lowercase and with dashes instead of spaces. For example, if you start a blog and write a post called “My First Blog Post”, then the default post slug would be “my-first-blog-post”.

What is Slug

What Is a WordPress Slug Used for and Can It Be Changed?

The purpose of a WordPress slug is to create user-friendly URLs that help readers and search engines know what your content is all about.

Think of it like naming a file on your computer. When you see a file called “2020-family-photo.jpg”, you know what to expect when you open it. That makes it much easier than a name like “IMG3256.jpg”.

Editing slugs is useful when a post title is very long, or if you’re going to be updating the content a lot. For example, you don’t want to use the slug “july-2020-deals” if you’ll be updating that post with new deals every month.

People can see the URL of your posts on search results pages or if the link is shared with them in emails, social media, or other places.

For example, here’s the slug for our step-by-step guide on how to start a WordPress blog:

a WordPress slug example shown in search results

People may decide whether or not to click the link based on your slug. Optimizing your slugs helps provide transparency and tells visitors what to expect when they click on a link.

WordPress slugs also help Google understand what your post is about and can help your posts rank better for the right keywords in search results.

WordPress Slug vs. Permalink: What’s the Difference?

Permalinks in WordPress are the permanent URLs of posts and pages on your website.

For example, the permalink of this page you’re reading right now is https://www.wpbeginner.com/glossary/post-slug/.

On the other hand, the slug is the editable and last part of the permalink. It acts like a label for a specific page or post.

For this page, the slug would be “post-slug”.

How to Change a Slug in WordPress

By default, your post slug will be determined by your post title. Any spaces will be replaced by hyphens, and the post slug will always be lowercase.

You can customize the default slug by visiting the Settings » Permalinks page in your WordPress admin sidebar.

Changing Permalink Post Name Setting

In WordPress, you also can edit the slug of an individual post or page while editing it.

When creating a new post, you’ll see the permalink after you enter a title for your post and click the ‘Save Draft’ link at the top of the page.

Save draft after adding a post title

Once you do that, click on your post URL from the block panel. This will expand a new tab where you can edit the post slug according to your liking.

Once you are done, don’t forget to click the ‘Save Draft’ button to store your settings.

Edit post slug

A post slug can also be changed by going to your admin sidebar and clicking on Posts » All Posts.

Just place your mouse over the post you want to edit. Then click on the ‘Quick Edit’ button under a post.

Quick Edit WordPress Post

This opens the quick editor where you can change the post slug and other options.

After you make the changes to your slug, click ‘Update’ and that’s it!

quick edit the slug in wordpress

How to Change Category and Tag Slugs

WordPress automatically generates a slug for your categories and tags, but you can also create your own slug. To change a category slug, go to the admin sidebar and select Posts » Categories.

Select the category slug you want to change and click the ‘Edit’ button. Now, type in your new slug and click ‘Update’ to save the change, just like we did with the post slug above.

edit category slug

To change your WordPress tags, go to your admin sidebar and click on Posts » Tags. From there, you can follow the same process we did for categories.

How to Change the Author Slug

If you have more than one contributor on your WordPress website, then you can create a customized slug for each author. WordPress does not allow you to edit the author slug by default.

If you need to change the author slug in WordPress, then you’ll need to use a plugin. You can follow our guide on how to change the author URL slug in WordPress for more details.

How to Write an SEO-Friendly Slug

The URL of a web page is one of the factors that search engines look at when trying to understand the content of a page, and how to rank it in search results.

If you want to rank your website content higher in search results and get more traffic, then you should consider writing SEO-friendly slugs whenever you publish a new post.

Here are a few SEO tips to keep in mind when publishing a new post or page:

Avoid using dates in your slug. This helps to keep your post from looking outdated on your website, in search results, and in other places.

Decide on your slug before you publish. You may want to change a slug after you have published a post, but this will also change the URL. Remember, these are permalinks (permanent links) to specific posts.

If you do change a slug, then your visitors and search engines won’t be able to find your content if they go to the old permalink. To fix that, we recommend setting up redirects to your post URL using a redirection plugin.

Keep your slugs short and descriptive. Be sure to include the main keyword you want to rank for in the slug. Use words that help describe the content of your post.

Pro tip: Use AIOSEO – All in One WordPress SEO plugin to further optimize your website to rank higher.

We hope this article helped you learn all about post slugs in WordPress and how they work! Check out the additional reading below to learn more.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Additional Reading

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!