A URL slug is the readable part of a web address that identifies a specific page — the segment that comes after the domain name. In https://example.com/blog/what-is-a-url-slug, the slug is what-is-a-url-slug. So what is a URL slug, in one sentence? It is the page’s human-readable label inside its web address.
Slugs matter because they are the first thing both people and search engines see before clicking. A clear slug tells a reader what the page is about at a glance, and it gives search engines a lightweight topical hint. That said, a slug is only one small piece of SEO — and changing one on a page that already ranks is one of the most common ways people accidentally break their own traffic.
Table of Contents
- What Is a URL Slug? Examples of Good and Bad Slugs
- SEO-Friendly URL Slug Rules
- Slug vs Permalink vs Path
- How to Create a URL Slug
- Do NOT Change Slugs on Live Pages
- What a Slug Can and Can’t Do for SEO
- Frequently Asked Questions
What Is a URL Slug? Examples of Good and Bad Slugs
The best way to answer “what is a URL slug” is with examples. Here are a few good and bad ones:
| URL | Slug | Verdict |
|---|---|---|
| example.com/best-coffee-shops | best-coffee-shops | Good — short, readable, descriptive |
| example.com/blog/url-slug | url-slug | Good — concise and clear |
| example.com/post?id=7291 | none (just an ID) | Bad — tells nobody anything |
| example.com/The_Best_SEO_Tools_For_2025! | The_Best_SEO_Tools_For_2025! | Bad — capitals, underscores, punctuation |
Notice that the slug is not the whole URL. URL parameters (the ?category=yoga part) and anchor links (the #best-yoga-poses part) are not part of the slug — only the page-identifying text segment is.
SEO-Friendly URL Slug Rules
There is no magic formula that guarantees rankings, but these rules are widely agreed on and easy to follow:
1. Use lowercase only
Uppercase letters can cause duplicate-content problems because some servers treat example.com/Page and example.com/page as different addresses. Always lowercase.
2. Use hyphens, not underscores
Search engines read hyphens as word separators (url-slug reads as “url slug”). Underscores join words together in Google’s eyes (url_slug reads more like “urlslug”). Use hyphens.
3. Keep it concise
A slug should be a summary, not a copy of the title. Strip out stop words (a, the, and, of, for) and anything that doesn’t help describe the page. how-to-create-url-slug is fine; how-to-create-a-really-good-url-slug-for-your-website-in-2026 is not.
4. Include your target keyword naturally
If the page targets “what is a url slug,” then what-is-a-url-slug is a natural slug. Don’t stuff multiple keywords in — one clear phrase is enough.
5. Strip punctuation and special characters
Remove commas, apostrophes, exclamation marks, parentheses, and other special characters. They add nothing and can break links in some contexts.
6. Transliterate accented and non-English characters
Characters like é, ü, ñ or non-Latin scripts get percent-encoded in URLs, producing ugly strings like caf%C3%A9-guide. The cleaner approach is transliteration: convert the characters to their closest ASCII equivalents (café becomes cafe, über becomes uber). Most CMS platforms do this automatically when you type a title. If yours doesn’t, a slug generator can convert a title into a clean, transliterated slug in one click.
7. Match the slug to the title’s topic
The slug should honestly describe the page. A mismatch between the slug and the content (“free-iphone” on a page selling used laptops) is misleading and erodes trust — and trust is what makes people click.
Slug vs Permalink vs Path
These terms get mixed up, so here is the distinction:
| Term | Meaning | Example |
|---|---|---|
| Full URL | The complete web address | https://example.com/blog/what-is-a-url-slug |
| Path | Everything after the domain | /blog/what-is-a-url-slug |
| Slug | The page-identifying segment | what-is-a-url-slug |
| Permalink | The permanent URL of the page | The full URL, intended to never change |
The word permalink hints at the core principle: a URL should be permanent. For the technical definition of each part of a web address, see MDN’s glossary entry on URLs — the slug lives in the path segment. Different CMS platforms label the field differently a URL should be permanent. Different CMS platforms label the field differently — “slug,” “URL slug,” “URL handle,” or “permalink” — but the principle is identical: pick it carefully once, then leave it alone.
How to Create a URL Slug
The manual process is simple:
- Write down the page title or its core topic.
- Reduce it to the essential descriptive words (3–5 words is ideal).
- Convert to lowercase.
- Replace spaces with hyphens.
- Remove stop words, punctuation, and special characters.
- Transliterate any accented or non-English characters.
Example: the title “What Is a URL Slug? (A Beginner’s Guide for 2026)” becomes what-is-a-url-slug — short, lowercase, hyphenated, and keyword-relevant.
Most content management systems generate this automatically from the title, but auto-generated slugs often keep stop words or end up too long. It’s worth reviewing and trimming them by hand — or running the title through a slug generator first to get a clean version you can paste in.
The same cleanup principle applies to text generally: stripping noise from text is exactly what tools like our duplicate-line remover do for lists — and a slug is, at heart, a tiny cleaned-up summary of your page’s topic.
Do NOT Change Slugs on Live Pages
This is the most important section of this article. If a page already exists and has any traffic, backlinks, or search rankings, do not casually change its slug.
Here’s what happens when you change a slug without handling it properly:
- Every existing link breaks. Anyone who bookmarked the page, linked to it, or shared it on social media now lands on a 404 error.
- You lose search rankings. Google has to find, recrawl, and re-evaluate the new URL from scratch. Your old URL’s accumulated authority doesn’t transfer by itself.
- Backlinks stop counting. Links pointing to the old URL don’t automatically help the new one.
You can recover most of this with a 301 redirect from the old URL to the new one. But be honest with yourself about the cost: even with proper redirects, expect ranking turbulence for weeks or months while search engines process the change. Redirects are a safety net, not a teleport.
If you’re considering changing a slug, ask: “Is the current slug actually hurting me?” An ugly-but-working slug on a ranking page is almost always better than a beautiful new slug with a redirect chain. The best time to get the slug right is before you publish — which is exactly why you should use a slug generator when creating new pages.
There are only a few situations where changing a slug is justified:
- The slug contains a typo or a misleading word that harms trust.
- The page’s entire topic has changed, so the old slug is now actively wrong.
- The page is brand new with no traffic, no links, and no rankings yet.
If you do change one, set up the 301 redirect the same day, update every internal link pointing to the old URL, and ask important external linkers to update their links. Then watch your rankings — and don’t panic at the dip.
What a Slug Can and Can’t Do for SEO
Let’s be honest about the limits, because plenty of SEO advice oversells this. Google’s John Mueller has confirmed that words in a URL are a (very lightweight) ranking signal, but he has also said keywords in URLs are “overrated” for SEO. Here’s a fair summary:
| A good slug can… | A good slug can’t… |
|---|---|
| Improve click-through when people read the URL before clicking | Rank a page on its own |
| Give search engines a small topical hint | Compensate for thin or weak content |
| Make links more memorable and shareable | Replace the need for backlinks or good content |
| Signal professionalism and trust | Recover traffic you lost by changing it carelessly |
A slug is a small multiplier on good work, not a substitute for it. Get the slug right at publish time, then leave it alone and focus on the content.
Frequently Asked Questions
What is a URL slug in simple terms?
What is a URL slug, in simple terms? It is the readable, page-identifying part of a web address — the words after the domain name that describe the specific page. In https://example.com/blog/what-is-a-url-slug, the slug is “what-is-a-url-slug”.
Should a URL slug include keywords?
Yes, include your primary keyword naturally when it fits, but don’t force it. The keyword in a URL is a very lightweight ranking signal; its bigger value is helping users understand and click the link.
Hyphens or underscores in a slug — which is better?
Hyphens. Google treats hyphens as word separators (“url-slug” reads as “url slug”) but joins words with underscores (“url_slug” reads like one word). Always use hyphens.
Is it bad to change a URL slug?
Yes, on a live page with traffic or backlinks, changing the slug breaks links and can cost rankings. If you must change one, set up a 301 redirect from the old URL, update internal links, and expect weeks of ranking fluctuation.
How long should a URL slug be?
As short as possible while still describing the page — typically 3–5 words. Strip stop words (a, the, and, of) and anything that doesn’t help a reader understand the topic at a glance.
So what is a URL slug? It is the small, readable piece of a web address that tells readers — and search engines — what a page is about before they click. Keep it short, keep it honest, and never change one casually on a live page.