As you get to grips with WordPress, you learn a whole set of vocabulary that seems, at first, to be nonsensical. Slug is one of those words that by no means denotes the part of the site it actually refers to.
However, your slug is vital because as a part of your permalink, it impacts your site’s SEO.
A slug in WordPress is the URL valid name of your web page or post. It creates a permalink for your page or post that is user-friendly (i.e., readable). You don’t need to create a slug for everything you create: WordPress automatically generates them directly from your title. But you need to switch on the custom permalinks setting for it to turn up in your URL title.
Slugs In WordPress: Linking 101
A slug in WordPress is the user-friendly part of your URL after your site address.
If you publish a post called “What is a Slug in WordPress,” then your slug will likely be some variant of www.yourwebsite.com/what-is-a-slug-in-wordpress.
As mentioned, WordPress generates a slug for you from your post title, but you don’t have to keep it. If you do edit it, stick to lowercase letters and use dashes in place of spaces. If you don’t, WordPress will correct your slug anyway.
To use slugs, you’ll need to enable your permalinks setting in WordPress.
How To Turn On Your Permalinks
Have you turned on your Permalink function yet? Here’s how to do it in a few simple steps.
First, open your WordPress dashboard and navigate to Settings.
From here, click Permalinks and switch them on.
That’s all you need to do. Once you enable the permalinks function, your post URL appears below your post title when you are on the Post Editing screen.
How To Change Your Post Slug
Don’t like your auto-generated post slug or find it too long? Did the substance of your post change with an update? You can change it within the post’s page. You’ll need to open the page up for editing by clicking the Quick Edit button.
Once you open up editing, you can alter your post slug.
You should avoid changing your post slug when you can and stick to title updates. Once you publish a post, changing the slug will publish the same content on multiple pages—one with the original link and another with the new one. The hyperlink to the post you published first (the original one) will break, and broken links impact your SEO.
How Post Slugs Relate To SEO
Slugs make it easy for users to read your permalink and URL. But slugs do more than promote an aesthetic. It can also boost your SEO rankings, and Google uses slugs to determine what your page is about and where to place it.
There are three rules of writing a slug two are technical, and one is SEO related:
Keywords are the fundamental SEO tool, and your use of them in a slug changes how Google reads your post.
If your title is “Why WordPress Slugs Change SEO Rankings” and your slug is “why-WordPress-slugs-change-SEO-rankings,” then Google knows that your page is about both WordPress Slugs and about SEO. It then knows to bring it up when someone searches for “WordPress slugs” and “SEO.”
If your title is “Why WordPress Slugs Change SEO Rankings” and your slug is “P5523-SEO,” then Google see the SEO keyword, but it doesn’t know what your article is about beyond that. Because Google isn’t sure where your page fits in, it won’t show up in the top search rankings.
What does that mean for you? It means you want to optimize your slug for SEO whenever you can.
How To Optimize Your Slug For Killer SEO Rankings
The raison d’etre of SEO is to connect people of the internet with the precise information they need when they initiate a search.
Your challenge, then, is to cater your site to Google’s search algorithms to make it digestible.
Optimizing your slug isn’t hugely technical. It relies more on meeting a few simple characteristics with an emphasis on simplicity and focus.
Here’s how to get it done.
Filter Out Filler
What are the words most critical to your title? These are your keywords, and you don’t want to distract from them with filler.
You’ll want to start by removing all those words that make grammatical sense in your post title but aren’t necessary for your slug. We’re talking about:
These filler words (or stop words) distract from the primary keywords, so they need to go.
But don’t stop there. Get rid of all the filler in there and bring your slug back to basics.
How you do this depends on your subject. In theory, you can reduce your slug to a single keyword if, and only if, you won’t have more pages or posts that require the same title.
For example, if you run an SEO blog, you want to include SEO in your SEO-related slugs, but you won’t ever use “SEO” on its own because you have so many relevant pages and posts.
On the other hand, if you are a blogger running a single sponsored post from a cream cheese brand, then you could theoretically shorten it to “brand-name-cream-cheese.” It’s short, to the point, and meets both your and your sponsor’s SEO goals. “blogger-eats-brand-name-cream-cheese-in-the-park-with-crackers” is too long and half the post is purely descriptive rather than functional.
Remember, you still have an SEO description to share more of the details of your post.
Should You Include Dates?
Sort through blogs and content strategy pages, and you’ll see a lot of URLs with dates in the permalink.
Some people argue that keeping the date is necessary because it denotes the most recent and therefore the most valuable information. That’s not necessarily true.
You didn’t write old blog posts to watch them disappear into irrelevancy. By adding dates to slugs, you’ll encourage this process by directing people only to the most recent information.
Ensure Your Slug Is Keyword Rich
If you have an SEO strategy, then the content or page includes a list of primary and secondary SEO keywords in the text. Be sure you don’t miss out on keywords when you pare your slug down.
You don’t need to stuff keywords in, but you should always make sure you include your primary keyword (and your most valuable) in your slug. Keep your focus keyword within the first few words of your slug, but don’t worry about making it the first word if it doesn’t fit naturally.
A consistent keyword strategy in your URLs and slugs makes a significant difference in your sites SEO results.
Keep It Consistent
Google itself doesn’t worry so much about consistency in your URLs and slugs, but you should, ideally from the beginning, try to keep a consistent style throughout your site.
Your permalinks and slugs impact your user experience (UX) of your site. When you build the architecture of your website, you want it to flow naturally. You try to harness what your users would think as they navigate your website so that you can guide them through your site and ensure they find the information you need.
Sites with a struggling architecture and permalinks (and slugs) that go unoptimized look jumbled up, almost a ball of string that instead of wound into a tight ball is a cartoonish mess.
When your permalinks (and slugs) follow a flowing site architecture, it improves the user experience both for human users and eventually Google.
What does this look like in practice?
First, if you choose to use short slugs, then keep it consistent throughout your site. Don’t optimize some without optimizing them all.
Second, use slugs to categorize your pages for easier navigation. For example, if you sell jam, candles, and blankets, you’ll want a page slug that includes “/jam/berries” for berry jam. It signals that you are on the pages that tackle jam and then devolves down to berries.
Third, always avoid dynamic URLs that don’t signify anything. Avoid any nonsensical group of letters, signs, and numbers because there’s no way to optimize it from a UX perspective.
Choose Your Slug In WordPress Wisely
A slug in WordPress is the part of your permalink that identifies the page in a user-friendly way. It’s an integral part of your site’s overall architecture, and it’s a critical piece of SEO. Google’s ranking algorithm needs to scan your slug without missing the point of your post.
Your goal is to make sure it includes your primary keywords without too much fluff and also ensures it remains a user-friendly part of your site’s entire architecture. Generally, that means removing unnecessary words and numbers and keeping your primary keyword close to the front of your slug.
How do you write your permalinks? Have you found a way to combine your SEO practices with your preferred UX aesthetic? Share your thoughts below.