WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Glossary» P» Post Slug

What is: Post Slug

57 Shares
Share
Tweet
Share
Pin

In WordPress, the “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”.

You can easily change the slug before you publish, or even to customize the default slug after you publish a page.

Why would you want to customize your post slug? Well, slugs help to identify a page on a website in a user-friendly way. They can help visitors and search engines determine a page’s content. Customizing your slugs can help improve your site’s SEO rankings and create a better user experience for visitors.

What is Slug

What is a WordPress Slug Used For?

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 own 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 how to start a WordPress blog guide:

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 to provide transparency and tells visitors what to expect when they click on a link.

WordPress slugs also help Google to 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/.

The slug is the last part of the permalink.

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 going to Settings » Permalinks on 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 your draft in wordpress

After saving the draft, you can edit your slug by clicking on the post title and then click Edit at the end of the permalink.

edit the wordpress post slug

Next, enter your custom slug in the space at the end of the URL and click the Save button.

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 just below 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 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 posts 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 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.

You can also subscribe to our YouTube channel for step-by-step WordPress video tutorials, and follow us on Twitter and Facebook for the latest updates.

Additional Reading

  • Permalinks
  • How to Change the Default Search URL Slug in WordPress
  • How to Change Author URL Slug and Base in WordPress
  • How to Remove Parent Slug From Child Page URL in WordPress
  • What is a SEO Friendly URL Structure in WordPress
  • How to Create Custom Permalinks in WordPress
57 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • How to Fix the Error Establishing a Database Connection in WordPress

    How to Fix the Error Establishing a Database Connection in WordPress

  • Google Analytics in WordPress

    How to Install Google Analytics in WordPress for Beginners

  • Checklist

    Checklist: 15 Things You MUST DO Before Changing WordPress Themes

  • How to Properly Move Your Blog from WordPress.com to WordPress.org

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
WP Mail SMTP logo
WP Mail SMTP
Fix WordPress email delivery issues. #1 SMTP plugin. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2020 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2020)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2020)
    • SiteGround Reviews from 4196 Users & Our Experts (2020)
    • Bluehost Review from Real Users + Performance Stats (2020)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2020 – Step by Step Guide
Deals & Coupons (view all)
Pretty Links
Pretty Links Pro Coupon
Get up to 35% OFF on Pretty Links Pro WordPress URL shortener and affiliate links cloaking plugin.
MainWP
MainWP Coupon
Get 15% OFF on MainWP WordPress multisite manager plugin.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).
Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress CDN by MaxCDN | WordPress Security by Sucuri.