What is a WordPress Slug? The Ultimate Plain-English Guide for British Website Owners

Confused by WordPress slugs? This definitive guide breaks down what they are, why they’re vital for SEO, and how to create the perfect URL slug for your posts.

A hyper-realistic, professional photograph showing a friendly web developer at a clean, modern desk in a bright, airy office in London. They are pointing to a laptop screen which clearly displays the WordPress editor, with the 'URL Slug' field highlighted. The mood is helpful, clear, and professional, with soft, natural lighting. Style of a modern tech blog feature image.

This post may contain affiliate links. If you make a purchase through these links, we may earn a commission at no additional cost to you.

Ever been tinkering with your WordPress website, maybe writing a new blog post, and spotted a little box labelled ‘slug’? You’re not alone. For many people building their own corner of the internet, it’s one of those odd bits of jargon—like ‘widget’ or ‘permalink’—that seems technical and a bit mysterious.

But what if I told you this little thing called a slug is one of the most important parts of your webpage?

Think of it as your website’s friendly postcode. It doesn’t just tell web browsers where to go; it tells people and search engines like Google what your page is all about, all before they’ve even clicked on it. Get it right, and you make your site clearer, tidier, and much easier to find. Get it wrong, and you could be confusing visitors and missing out on valuable traffic.

Don’t worry, though. It’s not nearly as complicated as it sounds. In this guide, we’ll break down everything you need to know in plain English. We’ll cover what a slug is, why it’s so vital for your website’s success, and how you can craft the perfect one every single time. Let’s get stuck in.

What Exactly Is a ‘Slug’ in WordPress? Let’s Break It Down

Right, let’s clear this up from the get-go. A WordPress slug is simply the bit of a web address (a URL) that comes after your main domain name and identifies a specific page. It’s the user-friendly, readable part of the link.

For example, imagine you have a website called mybrilliantbakery.co.uk. If you write a blog post titled “My Famous Victoria Sponge Recipe”, WordPress will automatically create a URL that looks something like this:

https://mybrilliantbakery.co.uk/my-famous-victoria-sponge-recipe

In this address, the slug is the part at the end: my-famous-victoria-sponge-recipe.

It’s just a few words, separated by hyphens, that neatly summarises the page content. It’s clean, it’s easy to read, and it’s unique to that page. Every single page, post, category, or tag on your site has its own unique slug.

Slugs, Permalinks, and URLs: What’s the Difference?

You’ll often hear the words ‘slug’, ‘permalink’, and ‘URL’ used together, and it’s easy to get them jumbled. Here’s a simple way to remember how they fit together.

  • URL (Uniform Resource Locator): This is the full web address for any page on the internet. It’s the whole thing you type into your browser, like https://www.bbc.co.uk/news. It tells the browser the exact location of the page.
  • Permalink (Permanent Link): This is a term WordPress uses for the full URL of a specific post, page, or another piece of content on your site. It’s called a ‘permanent’ link because, ideally, it shouldn’t change. In our bakery example, the permalink is the entire thing: https://mybrilliantbakery.co.uk/my-famous-victoria-sponge-recipe/.
  • Slug: This is the last, editable part of the permalink. It’s the bit you have control over.

So, to put it simply: the slug is a key ingredient in the permalink, and the permalink is the full URL.

An Everyday Analogy: Think of It Like a Book

If your website was a big book, the URL would be the instruction to find a specific sentence.

  • Your domain name (mybrilliantbakery.co.uk) is the title of the book.
  • A category (/recipes/) would be the chapter title.
  • And the slug (victoria-sponge) would be the page number.

It’s the final, precise instruction that takes you exactly where you need to go.

Why Should You Bother with Slugs? More Important Than You Think

You might be thinking, “Okay, I get it. But WordPress creates them automatically. Why do I need to care?” That’s a fair question. But taking a few seconds to check and edit your slugs can make a huge difference. Here are the three main reasons why they’re so crucial.

Reason 1: They’re Brilliant for SEO (Search Engine Optimisation)

Search Engine Optimisation, or SEO, is the art of getting your website to show up higher in search engine results on places like Google or Bing. Slugs are a small but mighty part of this.

When Google scans the internet, it looks at your URL for clues about what your page is about. If your URL is mybrilliantbakery.co.uk/p=123, Google has no idea what’s on that page. But if the URL is mybrilliantbakery.co.uk/victoria-sponge-recipe, Google immediately understands the topic.

By including your main keyword (the phrase people are searching for) in your slug, you’re giving Google a big, clear signal that your page is a relevant result. For example, if you want to rank for “vegan chocolate cake recipe,” having vegan-chocolate-cake-recipe as your slug is a massive help. It helps Google connect the searcher’s query with your content.

Reason 2: They Make Life Easier for Your Visitors

A good slug isn’t just for robots; it’s for people, too. A clean, descriptive URL helps set expectations for your human visitors.

Imagine you see these two links shared on social media:

  1. https://yourgardeningblog.co.uk/index.php?p=45&cat=7
  2. https://yourgardeningblog.co.uk/how-to-grow-tomatoes-in-pots

Which one are you more likely to click? The second one, of course. You know exactly what you’re going to get before you even click. It feels more trustworthy and professional. A clear URL also makes it easier for people to remember and share your link. It’s a small detail that contributes to a much better user experience.

Reason 3: They Keep Your Website Tidy and Organised

As your website grows, you’ll have tens, maybe hundreds, of pages and posts. Well-crafted slugs act like clear labels on filing cabinet drawers. They help you (and your visitors) understand the structure of your site at a glance.

This is especially true for things like product categories on an e-commerce shop or topic categories on a blog. Having clear slugs like /mens-jumpers/ or /gardening-tips/ makes your site much easier to navigate and manage in the long run.

How WordPress Automatically Creates a Slug

When you start writing a new post or page in WordPress and give it a title, the system springs into action. As soon as you save a draft, WordPress generates a slug based on that title.

The Default Setting: From Title to URL

Let’s say you write a post and title it: “The 5 Best Walks in the Peak District”.

WordPress will take this title and do a few things to turn it into a slug:

  • It converts all the letters to lowercase.
  • It replaces all the spaces with hyphens (-).
  • It removes any special characters, like question marks (?) or apostrophes (‘).

So, your default slug would become: the-5-best-walks-in-the-peak-district.

It’s a pretty good starting point, but as we’ll see, it’s not always perfect.

How to Find and Change a WordPress Slug: A Step-by-Step Guide

The good news is that checking and changing a slug is incredibly easy. It takes about ten seconds and should be part of your routine every time you create a new piece of content. Here’s how to do it.

Finding and Editing a Slug for a Post or Page

We’ll assume you’re using the modern WordPress Block Editor (also known as Gutenberg).

  1. Open your post or page. In the editor, look at the right-hand sidebar. If you don’t see it, click the little gear icon (⚙️) at the top right.
  2. Make sure you’re on the ‘Post’ or ‘Page’ tab. At the top of the sidebar, you’ll see two tabs. Click the one for the content type you’re editing.
  3. Find the ‘URL’ section. In the sidebar, you’ll see a panel labelled ‘URL’. Click on it to expand it.
  4. Edit the slug. You’ll see the full permalink displayed. The slug is the part that is editable in a text box. You can simply click in the box and type your new, improved slug.
  5. Save your changes. Once you’re happy, click the ‘Update’ or ‘Save Draft’ button at the top of the page. That’s it! Your new slug is live.

A quick note for Classic Editor users: If you’re using the older WordPress editor, the process is just as simple. Directly below the title box at the top of the page, you’ll see the permalink with an ‘Edit’ button next to it. Click that, change the slug, and click ‘OK’.

Changing Slugs for Categories and Tags

You can also customise the slugs for your categories and tags, which is great for keeping your site organised.

  1. Navigate to the right section. From your WordPress dashboard, go to Posts > Categories or Posts > Tags.
  2. Find the item you want to edit. Hover your mouse over the category or tag name in the list.
  3. Click ‘Edit’ or ‘Quick Edit’.
    • Quick Edit: This is the fastest way. A little box will appear right there on the page, with a field for the ‘Slug’. Change it and click ‘Update Category/Tag’.
    • Edit: This takes you to a full editing page, where you’ll find the ‘Slug’ field. Change it and click the ‘Update’ button at the bottom.

This is particularly useful for tidying up category names. For example, if you have a category called “News and General Updates,” the default slug would be news-and-general-updates. You could shorten this to just updates to keep the URL neat.

Crafting the Perfect Slug: Our Top 7 Best Practices

Okay, so you know what a slug is and how to change it. Now for the most important part: what makes a good slug? Follow these simple rules, and you’ll be crafting perfect, SEO-friendly slugs in no time.

1. Keep It Short and Sweet

Long URLs can look messy and are hard for people to read. The default slug WordPress creates from your title is often too long. Your goal is to be descriptive but concise.

  • Bad Slug: the-5-best-tips-for-making-your-garden-look-amazing-this-summer
  • Good Slug: summer-gardening-tips

Aim for between two and five words. Get straight to the point.

2. Pop Your Main Keyword in There

This is the most important rule for SEO. Your slug must contain the main keyword or keyphrase for your page. If your article is about training a cocker spaniel, your keyword is probably “cocker spaniel training,” so your slug should be exactly that: cocker-spaniel-training. It’s simple, effective, and tells Google precisely what your page is about.

3. Use Hyphens, Not Underscores

Always use hyphens (-) to separate words in a slug. Google sees hyphens as word separators, so it reads victoria-sponge-recipe as three distinct words. However, it sees underscores (_) as word joiners, so it would read victoria_sponge_recipe as one long, confusing word. Stick to hyphens. WordPress does this by default, so you just need to remember not to change them.

4. Ditch the ‘Stop Words’

Stop words are common, connecting words like ‘a’, ‘the’, ‘in’, ‘on’, ‘and’, ‘is’, ‘of’, and ‘it’. They don’t add any meaning and just make your URL longer. You can safely remove them.

  • Original Title: “An Easy Guide on How to Paint a Wall”
  • Default Slug: an-easy-guide-on-how-to-paint-a-wall
  • Optimised Slug: how-to-paint-wall or even just paint-wall-guide

Removing them makes your slug cleaner and more focused on the important keywords.

5. Make It Unique

Every page on your site must have a unique slug. If you try to use the same slug twice, WordPress will automatically add a number to the end of the second one (e.g., cocker-spaniel-training-2). This looks untidy and can confuse both users and search engines. Always double-check that your slug isn’t already in use for another page.

6. Keep It ‘Evergreen’

‘Evergreen’ content is content that stays relevant for a long time. Your slug should be evergreen, too. Avoid putting anything in your slug that might date it, like a year or a specific number.

For example, a post titled “Top 10 Gadgets of 2024” might get the slug top-10-gadgets-2024. But what happens next year when you want to update it to “Top 12 Gadgets of 2025”? Your slug will be out of date. It would be much better to use a slug like best-tech-gadgets. This way, you can update the page content as much as you like without ever needing to change the URL.

7. Stick to Lowercase Letters

While most modern browsers can handle uppercase letters in URLs, it’s best practice to stick to lowercase. Technically, my-page and My-Page could be seen as two different URLs, which can cause issues with duplicate content. WordPress automatically converts slugs to lowercase, so just leave them that way.

Common Slug Mistakes and How to Dodge Them

Creating good slugs is easy once you get the hang of it, but there are a couple of common traps that people fall into. Here’s what to watch out for.

The Big One: Changing a Slug on a Live Post

This is the most important warning. You should avoid changing the slug of a page or post after it has been published.

Why? Because changing the slug changes the entire URL.

If your page has been live for a while, people might have bookmarked it. Other websites might have linked to it. You might have shared it on social media. If you change the URL, all of those old links will break. Anyone clicking them will land on a “404 Not Found” error page.

This is bad for your visitors and terrible for your SEO. Broken links are a red flag for Google, and you’ll lose any of the authority or ‘link juice’ that the old URL had built up.

What if you absolutely have to change a slug?

Sometimes it’s unavoidable. Maybe you made a typo or your business focus has changed. If you must change a slug, you need to set up a 301 redirect.

A 301 redirect is a permanent instruction that tells browsers and search engines that your page has moved. It automatically sends anyone who visits the old URL to the new one. It’s like setting up a Royal Mail redirection when you move house. This way, you don’t lose your visitors or your SEO value.

You can set up 301 redirects using a WordPress plugin. Popular SEO plugins like Yoast SEO or Rank Math have built-in redirect managers, or you can use a dedicated plugin like Redirection. It’s a crucial step that you must not forget.

What About Duplicate Slugs?

As mentioned earlier, if you create a post with a slug that already exists, WordPress will add a -2 to the end (e.g., my-post-2). This often happens if you delete a post and it’s sitting in your ‘Bin’. Even though it’s in the bin, it’s still technically using that slug. To fix this, you need to go to your bin and permanently delete the old post. Then the original slug will be free to use again.

Numbers, Dates, and Special Characters: Best Avoided

Your slug should only contain letters, numbers, and hyphens. Avoid ampersands (&), pound signs (£), commas, and other symbols. They can break URLs or be converted into long, ugly strings of code (like %26).

Also, think carefully before including numbers in your slug. If your post is “5 Ways to Save Energy,” the slug 5-ways-to-save-energy is fine. But if you later update it to “7 Ways to Save Energy,” the slug is now inaccurate. A more evergreen slug like ways-to-save-energy would have been a better choice from the start.

Slugs Beyond Posts and Pages

Slugs aren’t just for posts and pages. They are a fundamental part of how WordPress organises all content. This includes:

  • Products: If you run an online shop with a plugin like WooCommerce, each product will have its own slug (e.g., /products/blue-knitted-jumper).
  • Portfolio Items: If you’re a designer or photographer, your portfolio pieces will have slugs (e.g., /portfolio/london-wedding-shoot).
  • Custom Post Types: Many themes and plugins create their own ‘post types’. For example, a real estate theme might have a ‘Property’ post type, leading to slugs like /property/4-bed-house-in-islington.

The principles for crafting good slugs are exactly the same for all these content types. Keep them short, keyword-rich, and readable.

Conclusion: The Humble Slug, Your Website’s Unsung Hero

And there you have it. The WordPress slug, demystified. It’s not a scary, technical beast after all. It’s simply a clean, logical label for your content.

It’s one of those tiny details that, when done right, comes together to create a website that’s a pleasure to use and easy for search engines to understand. By spending just a few extra seconds on every page and post you create, you can make your URLs work harder for you.

So next time you see that little ‘slug’ box in your WordPress editor, don’t ignore it. See it as an opportunity. A chance to be clearer, smarter, and more helpful to your audience—one hyphenated, lowercase, keyword-rich phrase at a time.

Further Reading

For those who want to dive even deeper, here are some of the most respected resources in the industry:

Want More Like This? Try These Next: