what is slug…?? use of slug…???
Don’t worry, you’re not alone!
I’ve encountered a lot of people who don’t know where to find their slug, or don’t even know what a slug is. Let’s figure this out!
What is a slug?
A slug is a URL-friendly version of your post or page title. It’s the part that comes after your main domain name. For example:
I’ve highlighted the part that is the slug. It’s only the end piece of the URL.
Now that we’ve figured out which part of the URL is the slug, let’s talk about how it’s different.
When WordPress (or other platforms) create a slug from your post or page title, they usually follow a few rules:
- Converted to all lowercase.
- Spaces are replaced with dashes.
- Special characters and symbols are removed.
How to find slugs
*snort* I couldn’t help myself!
There are slugs for all public-facing parts of WordPress. They exist for posts, pages, categories, and tags.
You can see your post slug when you’re editing a post. It’s visible just under the title where it says “Permalink”. The slug portion is what’s highlighted in yellow.
You can edit the post slug by clicking the “Edit” button.
Category slugs can be seen on the Posts » Categories page. There’s a whole column dedicated to slugs. You can edit them by editing a category and modifying the “Slug” field.
Tips for having a great slug
Did you know that your URL contributes to your SEO? It’s just a small amount, but every bit helps!
Google likes short, keyword-rich slugs. There are certain words that Google strips out from search results because it doesn’t consider them to be “keywords”. These are words like “for”, “and”, “if”, “or”, etc. They’re called stop words. Since Google doesn’t consider them important when finding search results, there’s no point having them in your URLs, taking up valuable real estate!
Consider stripping out stop words from your URLs
Here are some before and after examples of my own slugs:
In order to make my URLs shorter and more valuable, you can see how I’ve stripped out stop words or other words that I feel don’t contribute to the value of the post.