SEO & GEO
What Is a Slug? The URL Slug Explained With Examples
Copy for AI
A URL slug is the descriptive part of a URL after the last forward slash.
In yourcompany.be/services/accounting-software, the slug is accounting-software. It tells people and search engines what to expect before they click.
The verdict: pick a short, readable slug once, then leave it alone. Changing it later costs more than a slightly imperfect slug ever will.
What is a slug exactly?
It’s the last, unique part of a URL that names one specific page.
Every URL has parts: the domain, any folders and, at the end, the slug. Compare:
- Bad:
yourcompany.be/p?id=4821 - Good:
yourcompany.be/blog/b2b-lead-generation
In the second one, b2b-lead-generation tells you what the page is about.
The term comes from journalism. There, a “slug” was the short working name of an article.
What is a slug URL?
A slug URL is simply a URL that ends in readable words instead of an ID.
yourcompany.be/blog/b2b-lead-generation is a slug URL. yourcompany.be/?p=4821 isn’t: it points at a database row.
WordPress calls that second type a “plain” permalink and says in its permalink documentation that it’s “not optimized for search engines”.
Slug vs URL vs permalink vs path
People mix these four terms up. Here’s how they relate:
| Term | What it is | Example |
|---|---|---|
| URL | The full web address, protocol included | https://yourcompany.be/blog/b2b-lead-generation |
| Permalink | The permanent URL of one page or post | Same as above, meant never to change |
| Path | Everything after the domain | /blog/b2b-lead-generation |
| Slug | Only the last, page-specific part | b2b-lead-generation |
Short version: every slug sits inside a permalink, but a permalink is more than its slug.
Where the slug sits in a URL
Take https://yourcompany.be/blog/b2b-lead-generation and break it into parts:
The same breakdown as a table:
| Part | Example | Who decides it |
|---|---|---|
| Protocol | https:// | server / hosting |
| Domain | yourcompany.be | once, at registration |
| Path / folder | /blog/ | your site structure |
| Slug | b2b-lead-generation | you, per page |
The part you control most
The slug is the element you, as a content creator, have the most direct control over.
The full combination forms the permalink. A good slug belongs in your approach to SEO-friendly URLs, aligns with your internal links and fits your broader SEO.
What does slug mean in software and web development?
In software, a slug is a short, URL-safe label generated from a title.
So a “web slug” and a “slug in software” are the same idea seen from two sides: the editor sees a field, the developer sees a sanitised string.
How frameworks and CMSs define it
The Django documentation describes a slug as “a short label for something, containing only letters, numbers, underscores or hyphens”. Its SlugField uses a default maximum length of 50 characters.
WordPress builds the slug from the title. Its docs give the example: “This Is A Great Post!” becomes this-is-a-great-post.
Here’s where you’ll meet the slug in common systems:
| System | Where the slug lives | What happens by default |
|---|---|---|
| WordPress | The post slug field in the editor | Generated from the title, used by %postname% |
| Django | A SlugField on the model | Max 50 characters unless you set max_length |
| Most other CMSs | A slug or URL field next to the title | Usually generated from the title, editable before publishing |
Why “slugify” matters
Developers call the conversion step “slugify”: lowercase the title, strip punctuation and accents, swap spaces for hyphens.
Watch out: an automatic slugify keeps every word of a long title. That’s why you still shorten it by hand, as the next section shows.
Running WordPress? Our WordPress SEO checklist covers the permalink setting first. Picking a platform? See which CMS to choose.
How do you create a good slug?
Make it short, lowercase and readable, with your main keyword in it.
Google’s URL structure documentation asks for “readable words rather than long ID numbers”. Five concrete rules:
- Length: 3 to 5 words, enough to describe the page
- Hyphens:
b2b-lead-generation, notb2b_lead_generation - Lowercase: Google treats
/APPLEand/appleas different URLs - Keyword: the word the page wants to be found for, unforced
- No clutter: drop stop words, spaces, accents and
%20
Why hyphens, not underscores
Google recommends hyphens to separate words in URLs.
Its reason is historical: underscores are common in programming to join terms that belong together.
Why lowercase only
Capitals can be seen as separate URLs and cause duplicate content.
Stick to one case and the problem never starts.
Rule of thumb: if you can read the slug out loud without spelling it, you’re on the right track.
What does a slug fix look like in B2B practice?
For example, a software company publishes a new service page. The CMS generates the slug solution-2024-v2-final.
That’s an internal working name, not an address a prospect trusts.
The trust problem
Someone who sees v2-final in a LinkedIn link quietly wonders: is this the right, current page?
In a B2B purchase several people look along, so that doubt multiplies.
The fix before publishing
Change the slug to accounting-software-for-smes before you publish. Three things happen at once:
- the link becomes shareable and understandable
- your main keyword sits in it neatly
- the URL no longer ages with internal version numbers
In practice, we see trust is the biggest winner.
Which slug mistakes do you see most?
Four pitfalls come back time and again:
- Auto slugs: the CMS copies the full title, with stop words and dates
- No redirect: you change the slug and lose links and link equity
- Dates:
/blog/2024/lead-generationforces a URL change once 2024 is over - Keyword stacking:
b2b-lead-generation-generate-leads-companiesreads like spam
Fix: shorten the auto slug before you publish, and drop the year.
Why can’t you just change a slug?
Because a new slug is a new URL, and without a redirect the old one breaks.
Every link that pointed to the old version now hits a 404. Think of links such as shared posts, emails, mentions and the backlinks you collected.
Links point at exact slugs
Here’s what that looks like on our own site. Search Console lists the pages other sites link to most:
The Links report in our own Search Console for customerimpact.be, October 2026. Every row is a URL with its own slug.
Our /diensten/seo/ page has 6 external links in that report. Rename its slug without a redirect, and all 6 land on a 404.
The internal side is bigger still: 364,879 internal links in the same report.
If you must change it
Do three things, in this order:
- Set up a 301 redirect from old to new.
- Update your internal links.
- Update your sitemap.
Parameters make URLs messy too
Google’s URL guidance also warns against cryptic IDs and superfluous parameters.
Want to know how those parameters clutter your URLs? Read what a URL parameter is.
How much weight does a slug carry?
Little: a keyword in your slug won’t suddenly make you rank higher.
The real gain lies in readability, trust and shareability. A clean slug gets clicked and shared more often.
Searchers often see the URL path right in the result:
Low-hanging fruit, once
For most B2B sites this is a quick, one-off fix. If your slugs are already short and logical, don’t “optimise” them for an imaginary advantage.
Point your attention at content, authority and conversion instead, because that’s where the revenue sits.
Decision rule: slugs full of parameters? Fix them once. Clean slugs? Leave them.
Frequently asked questions
What’s the difference between a slug and a permalink?
The permalink is the full, permanent URL of a page. The slug is only the descriptive piece at the end, after the last forward slash. So the slug is part of the permalink.
Does my keyword have to be in the slug?
Preferably yes, without forcing it. The ranking benefit is small, but a slug with your keyword in it is clearer for visitors and gets clicked more often in the search results.
Hyphens or underscores in a slug?
Hyphens. Google recommends hyphens to separate words in URLs, so my-slug reads as two words. Always use hyphens as the word separator.
Can I still change an existing slug?
Only with a good reason and always with a 301 redirect from old to new. Without a redirect you lose traffic and link equity. If your slug is already good, leave it alone.
Ready to get your URL basics in order?
Slugs and URL structure are do-it-once work: get it right, then tick it off.
We’ll tell you plainly when something isn’t worth the effort, even when your slugs are already fine.
Send us your site and within 24 hours you’ll know which URLs need a fix, if any.
Free website scan
Enter your website and get an automatic scan within minutes, with concrete technical and SEO improvements. No sales pitch.
We only use your details for your scan. No spam, unsubscribe anytime.