How to Write a Good URL Slug
Lowercase, hyphens, and shorter than the title. And never change a published one without a redirect — the slug IS the page's address.
The rules, in order of how much they cost to get wrong
- Never change a live slug without a redirect — breaks every link that exists
- Lowercase — because
/About-Usand/about-usare different pages - Hyphens, never underscores — underscores read as word joiners
- Shorter than the title — a slug is not a headline
Only the first one is expensive. The rest are cheap if you decide once and never revisit.
Slug
Lowercased, hyphen-separated, punctuation removed.
how-to-write-a-good-url-slug-a-complete-guide-for-2026
Shortened — a blunt cut at 50 characters
NOT cut at a word boundary. Expect a trailing hyphen or half a word, and finish it by hand.
how-to-write-a-good-url-slug-a-complete-guide-for-
Characters in the full slug
Under about 60 keeps it readable in a search result.
54
Words in the title
A slug rarely needs all of them.
13
With underscores — do NOT use this
Shown only so you can see the difference. Search engines treat underscores as word JOINERS.
how_to_write_a_good_url_slug_a_complete_guide_for_2026
Open the URL Slug Generator on its own page to bookmark or share it.
What the conversion does
Lowercases everything, replaces every run of non-alphanumeric characters with a single hyphen, trims hyphens off both ends.
How to Write a Good URL Slug — A Complete Guide for 2026!
becomes
how-to-write-a-good-url-slug-a-complete-guide-for-2026
Deliberately mechanical, which means predictable — the same title always produces the same slug. That matters as soon as you're generating them at any volume.
Why lowercase isn't cosmetic
URL paths are case-sensitive on most servers. /About-Us and /about-us are genuinely different addresses.
If both resolve, you've duplicated every page on the site — which splits whatever ranking signals they earn. That's a real SEO problem, not an untidiness.
Choosing lowercase and never deviating removes the question permanently, which is worth more than any individual case decision.
Hyphens, without exception
Search engines have long treated a hyphen as a word separator and an underscore as a word joiner. So red_shoes can read as one token where red-shoes is unambiguously two words.
No upside to underscores, one clear downside.
The tool shows an underscored version purely so the difference is visible. It's a demonstration, not an option.
A slug is not a title
This is the rule people skip.
how-to-write-a-good-url-slug identifies the page and reads well in a link, a search result and a shared message.
how-to-write-a-good-url-slug-for-your-website-in-2026-complete-guide does that job no better, and looks worse everywhere it appears.
Dropping the small words — a, the, of, for, to, and — is the standard way to tighten one, and costs almost nothing in meaning. Under about 60 characters keeps it readable where it matters.
The shortened output is a blunt cut at 50 characters, not a clever one. It'll leave a trailing hyphen or half a word, on purpose — so you finish the edit deliberately rather than trusting a machine to guess where the meaning ends.
Accents fold. Non-Latin scripts vanish
Two different behaviours, and the difference matters a lot:
| Input | Slug |
|---|---|
Café Crème & Naïve Résumé | cafe-creme-naive-resume ✅ |
Über den Wolken — 東京 | uber-den-wolken ⚠️ |
Latin accented characters are transliterated to their base letters — exactly what you want.
Characters outside the Latin alphabet are dropped entirely. The Japanese is gone without trace.
So a French or German title is fine. A Japanese, Greek, Arabic or Cyrillic one may lose its entire subject. If you aren't working in a Latin script, this is the one output you must read before using.
Leave the year out
A slug containing 2026 looks stale in 2027 even if you've updated the article thoroughly.
And fixing it means changing a published slug — which means the redirect problem below. The cost is paid every year; the benefit is small and lasts a few months.
Dates belong in the title and the page metadata, where they can be changed freely.
The expensive one
The slug IS the page's address.
Changing it breaks every existing link, every bookmark and every citation, and search engines treat the new URL as a new page starting from zero authority.
If you must change one, set up a permanent redirect from the old address — at the same moment you make the change, not afterwards.
And if a slug is merely imperfect rather than wrong, leaving it alone is usually the better decision. Perfect slugs on a site nobody can link to are worth nothing.
Print the style sheet — it exists mainly so a site's URLs stay consistent when more than one person is writing them.
Free tool
URL Slug GeneratorTurns a headline into a clean URL slug - and shows you the shortened version too, because the best slug is usually not the whole title.
Open the tool →Enjoyed this? Get the next one.
New articles straight to your inbox. No spam, ever.
Keep reading
How URL Encoding Works (And Which Encoder You Actually Want)
Encode 'salt & pepper' with the wrong encoder and the server reads it as two parameters. That single confusion causes a large share of all URL bugs.
Jul 31, 2026 · 3 min read
How DNS propagation time is estimated
Learn what DNS propagation time really means, how to estimate it from TTL and cache windows, and what the calculator can’t know.
Aug 4, 2026 · 5 min read
Find and Replace Without Regex
Search for 3.14 and you get 3.14 — not 3x14. Every character means itself, which is both what you wanted and the reason it can't hang your browser.
Jul 31, 2026 · 4 min read