what is slug…?? use of slug…???
Chandrahas
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:
https://www.nosegraze.com/what-is-slug-wordpress/
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.
Post slugs
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
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:
Before | After |
---|---|
what-is-a-slug-in-wordpress-tips-for-a-great-post-url | slug-wordpress-tips-url |
adding-bootstrap-styles-to-the-comment-moderation-message-in-wordpress | bootstrap-styles-comment-moderation-wordpress |
tips-for-choosing-the-perfect-blog-name-free-worksheet | tips-choosing-perfect-blog-name-free-worksheet |
how-to-bill-clients-as-a-new-freelancer | bill-clients-new-freelancer |
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.
Actually never realized I needed to do anything with the slug cause I didn’t really know what it was. π
Now you know! π
I still wonder why they call it a ‘slug’… hmm… thanks for the tips, Ashley! π
Yeah I have no idea. π
I think it’s a carry-over from an old newspaper term where a slug was the first piece of a section of set type (or something like that). Ultimately refers to pieces of lead that are not useful (I’d have to look this up but that’s close).
I’ve actually been consuming Paul Jarvis’ article archive (https://pjrvs.com/articles/) this weekend and I like how he chooses one keyword for each article – I usually want my URLs to be EXACTLY what the post title is and I get made when WP strips them out because then I have to actually do work to find out what my slug will be haha Maybeee I should reconsider haha
That’s interesting. But if there’s more than one word that describes my post, I wouldn’t want to strip those out. Like “How to name your blog”. I think both “name” and “blog” are important keywords. I wouldn’t want to kick one to the curb!
Ohh if you’re annoyed at WP stripping out words, then that’s actually the SEO by Yoast plugin. There’s a setting for stripping out stop words, which I think is turned on by default.
I knew what slugs were and how to edit them, but I didn’t think of editing them. I’ll be doing it in the future, Great tip. π
Love it! I knew what slug was but i didn’t know it was important for google search and raise the seo π
I’ve always known that we can change the URL of a post but didn’t know that it was called slug! I never tried changing it though because I didn’t think that it mattered that much for search engines xD
Short, sweet, keyword rich. π That’s what Google likes!
I just thought slugs ate my plants and putting out egg shells worked or beer lol. Thank you for a great tutorial
Jo xxx
I do edit them sometimes, but I don’t always remember to, and once the post is live, I can’t change the slug. I’m trying to get better about checking it before hitting the “schedule” button!
Actually you can edit it when the post goes live. π WordPress should redirect any old slugs to the new one automatically!
You can edit the slugs after you post on WP? Wow! I had no idea.
The name is weird (lol), but the tips are awesome. Thanks so much for sharing!
http://www.intheknowwithro.blogspot.com
I had no clue what a slug was! Thanks Ashley!
I didn’t know that’s what they were called, but I do edit mine. Question – when you have a book title that has a stop word in it or punctuation (like apostrophe), what do you do with your slug? I tend to make me SEO keyword the book title for a review, but when the above happens I either add back the stop word or (especially with the punctuation) have a weaker SEO. I don’t fully get SEO – but I always aim for a green light on my SEO plugin thingy…. Lol thanks!
I used to be really particular about my book review slugs. I always wanted them to match the title EXACTLY, even if it included stop words. This wasn’t for any SEO reasons, it was just something I liked on my blog.
But now, I’ve kind of grown out of that and I remove them. Those words are ignored in Google anyway, so you don’t need to have them in there. Doing so doesn’t increase your SEO. But that being said, NOT removing them won’t hurt you too much. But if your review slug is SUPER LONG with the stop words in, then I think you should consider removing them because shorter = better. π (for SEO, and they just look nicer in my opinion)
Perhaps a tiny bit off topic, but what about having the date in the URL? I came over from blogger so all my posts have the date…could I safely switch formats so that new URLs don’t have the date? Great tips for editing the slugs–this was one of the easy aspects of WP that I loved when I came over!
Here’s my post on changing your permalink structure without losing SEO. It’s worth a read and will help you change to just the post version but make sure your old URLs redirect. π
Great knowledge is always a good thing to know. Grazie for sharing! π
mia | La Bijoux Bella
http://www.labijouxbella.com/confidence-is-inspiring-perhaps-is-arrogance-a-turn-off/
Hi Ashley! I know this is a pretty late comment but what about in WordPress.com? Does it still improve SEO when the slugs has dates on them? Thanks!
I’m not sure if you mistyped that or not, but having dates doesn’t improve SEO. It doesn’t necessarily have a negative impact, but it does make your URLs a lot longer, which isn’t ideal. And ultimately, the dates are totally unnecessary!
If you had the power to change them (which I don’t think you do, but correct me if I’m wrong) then I would suggest changing to post title only. But you won’t see a noticeable negative impact on SEO if you do have dates in your URLs.
Does that make sense?
Man, I do learn a lot since I decided to check other SEO and blogging specialists. I’ve been working on content marketing and SEO on Slovenian small furniture market and never really learned what exactly slug is. Thank you, thank you…. I am getting smarter :), Regards, Matija, Slovenia
It was good help very well explained
thank you
Hi, Ashley!
Thank you so much for this valuable post! I’m just starting my path toward becoming a “WordPress boss” helping a friend with SEO, and I am SUPER GLAD I stumbled onto your post via Google (must be those handy slugs!).
I also blog on WordPress, and this information is GOLD to a blogger like me. Thank you, thank you, thank you, thank you!!
I love your site, you rock, I want to learn it all and then some. π
Very helpful. I have always wondered the use of slug, now u have understood. I want to know if it’s allowed to use different words in your slug by not necessarily using your post titled words. eg: post tile is PLEA OF BARGAIN and my slug will be FELONY MURDER.
You can do whatever you want! Though your SEO won’t be quite as focused if you’re not using consistent keywords. But ultimately it’s your choice.
Hello Ashley,
How often can we change slugs and how does it help in SEO? Is it one of the crucial factor of SERP?If i customize the slug it will lead me to URL redirection rsulting in higher page loading time. How can we resolve this issue. Please guide me on this
Why do you want to change slugs so often? I can understand messing it up the first time and needing to change it once, but you shouldn’t be changing it multiple times.
Hello Ashley,
I totally agree. Thanks for the quick reply. But I am yet to get my other answers form you that how far it will help in higher SERP since there are other factors of on-page SEO like meta tags,alt tags,fixing broken links,keyword specific contents that also helps in the ranking factor as well. Please share your thoughts on this.
It is certainly a factor. It helps to have the keywords you want to rank for in your slug.
THANK YOU for this! This helped a ton. Slug…what an odd thing to call it! Love that you posted a pic of one too, ha!
Thanks skippy…
Your information about slugs was very insightful
Hi Ashley,
What if the keyword I targeted was “best plates for babies”, and I have the keyword appearing plenty times on the post, in the header etc. It is also in my post title “The best plates for babies”
Would leaving the “for” stopword in my slug reduce my ranking or improve it?
Having one instance of ‘for’ wouldn’t really help or hurt you SEO-wise. It would just be totally useless since Google would ignore it. But there are benefits to having a shorter URL, which is why I’d remove it.
Nice article. I want just wondering what slug means after I installed Yoast SEO plugin
Thant a lot, your tips is very useful
How can I use full title as slug?
Hi Ashley, Superb article, Thank you for sharing this with us. I always got that orange button in my yoast plugin slug because of stop words. Now i am able to get it green after reading this article.
Thanks again
Hi Ashley, Thanks for your post!
I’m new in this, and now I have a problem and I hope you can give me an advice please…
When I see any of my ‘pages’ on the web (Not the ‘Front Page’ of my site) I can see normally the “URL + SLUG” that is “the same I have written “inside my page editor”. However I’ve realized that in my “Front Page” when you go to the web is seen “Just the URL without the SLUG”, but “inside my ‘page editor ‘ (of the same Front Page) I have written not just the URL seen on the web but the “URL + SLUG” complete! How it can be?
So, what happens with the “SEO Ranking” if I change (do it better) or just ‘cancel’ the SLUG of my “Front Page” and leave just the URL?
Then my main issue is that due to a memory problem (I will not take your time talking about this now) I can not access to my “Front Page” to “edit it”, however I’ve found a way to do it: I just ‘duplicate’ my Front Page (with a Plugin) and fortunately I can access to edit “the duplicated New Front Page” however “the SLUG changes”, is the new SLUG a problem for the “SEO Ranking I have already gained all over a year” with the old URL + Slug?
Please, I need you advice!
Thank you in advance!!!
Cesar
Hmm… I always liked having the stop words in the URL because it lets you know what the topic of the page is just by looking at the URL. I suppose Google doesn’t actually mind if I include them, right? π
Hi Ashley,
Good reading post here.
I’ve seen some blogger have long url with many keywords included in the URL.
Do you think it is a good idea? Because I see they rank so high for all those keywords.
Hello and thank you for the information. Very clear and easy to understand.
I understand about where to find the slug in a url but and here’s the question. Is the slug in the Home page/landing page the name of the site? My site is rentmycondojomtien.com So my slug would be for the home page: rent-my-condo-jomtien?
By the way I’m still working on the site so a few things still need to be done.
Thank you again for your information.
All the best from sunny Thailand
As your married to a Brit, I’d just like to say hello from another Brit :-))
Thank you so much for this slug info…really easy to understand and very useful x
Thank you for such an informative post. You explained everything in a simple and easy to understand manner for a new blogger such as myself. I have not yet launched my blog but I do hope so soon as I am inspired by others, such as yourself, who have created wonderful blogs and content.
Wow. now I can go and work on my posts. I was wondering what slugs are and now I can get rest of mind. Thanks for the detailed explanation Ashley
wonderfully explained.
Thanks a ton