tooldura

Text Tools

URL Slugs: What Belongs in a Path and What Quietly Breaks It

T
tooldura editorial
7 min readUpdated August 14, 2026Open tool →

A slug is the last segment of a URL, the part a person can read. It is also the only part of the address you choose word by word, which is why it collects opinions. Most of them are about ranking, and most of those are overstated. The rules worth knowing are the ones about what a path can legally hold, what a browser does to the rest, and what happens on the day you change one.

What Happens to a Real Title

Each row is a case where the naive answer, deleting anything that is not a letter, gives a worse slug than the considered one.

TitleSlugWhat the rule is doing
Café Málagacafe-malagaAccents decompose into a base letter plus a mark, and the mark is dropped
Straße 12strasse-12ß has no decomposition at all, so only a lookup table gives the right answer
R&D Report 2026r-and-d-report-2026Deleting the ampersand would leave r-d, which says nothing
Google's New APIgoogles-new-apiThe apostrophe closes up rather than splitting a word in two
Привет мирprivet-mirCyrillic is romanised, since stripping non-Latin letters would leave an empty slug
Part 1: Setuppart-1-setupThe colon is reserved, and this is also the classic duplicate-slug collision

Hyphens, Underscores, and Where the Advice Came From

Both characters are unreserved. Both work. The recommendation for hyphens comes from Google's own documentation on URL structure, which asks for hyphens between words and specifically discourages underscores.

The reason is historical and mechanical: Google's tokeniser treated a hyphen as a word break and an underscore as part of the word, so /blue_widgets was read as one token, bluewidgets, rather than two. Matt Cutts explained this publicly as far back as 2005, and while Google has since said the difference is minor, the recommendation in the documentation has never changed.

The practical case is simpler than the algorithmic one. Hyphens are easier to read, they are what every mainstream CMS produces by default, and they do not disappear under the underline that browsers, chat clients and email apps draw through link text. That last one alone has caused more mis-copied URLs than any ranking effect ever will.

The Rules That Are Worth Following

Short list, because most slug advice is preference dressed up as optimisation. These five have a mechanism behind them.

1

Lowercase everything

Paths on Linux servers are case-sensitive, so /About and /about are two different URLs. Serving both splits your links between them and creates duplicate content you then have to canonicalise. Lowercase and redirect the variants.

2

Keep it to a few words

Not because length is a ranking factor, but because URLs get truncated everywhere they are displayed: search results, breadcrumbs, social previews, analytics tables. The first few words are the ones that survive the cut.

3

Do not put dates in it

A slug like /2024-hosting-guide ages the page even after you update it, and changing the slug to refresh it costs you a redirect. Publication dates belong in structured data, where you can update them freely.

4

Match the title, not the keyword list

The slug is shown to people in the result. Stuffing it with terms the headline does not contain reads as spam to a human before it reads as anything to a crawler.

5

Decide it before you publish

This is the only one that is expensive to get wrong. Everything else can be improved in place; changing a live slug is a URL change, with everything that follows from it.

🔗

Changing a published slug is a migration, not an edit

The old URL stops existing. Every link pointing at it, every bookmark, every share in a chat thread you cannot edit, and the accumulated ranking signals all point somewhere that now returns 404. A 301 redirect from old to new passes those signals along and is not optional. Google has confirmed 301s pass full PageRank, but redirects still accumulate: chaining three of them across three renames is a real cost, and the cheapest fix is to leave a good-enough slug alone.

Generate a slug from any title

Accents romanised, symbols spelled out, a whole list at a time.

Open Slug Generator →

What an Accented URL Looks Like After Encoding

Non-ASCII characters are legal in a modern URL. RFC 3987 defines IRIs, which allow the full Unicode range, and browsers display them as typed. This makes a Cyrillic or Greek slug look perfectly clean in the address bar, which is where the trouble starts.

The moment that URL leaves the browser, it converts to its ASCII form. /статья becomes /%D1%81%D1%82%D0%B0%D1%82%D1%8C%D1%8F. That is what gets pasted into an email, logged in your server access log, shown in analytics, and sometimes what a chat client displays instead of the pretty version. A six-letter word becomes 36 characters of hex.

So the choice is not about correctness. Both forms work. It is about whether the audience for a URL is people who read that script, in which case the native form is friendlier despite the encoding, or a general audience who will mostly see the encoded version. Transliteration gives up the exact spelling to keep the URL legible everywhere it travels.

The Collision Nobody Plans For

Slugs must be unique within a site, and titles are not. "Part 1: Setup" and "Part 1 - Setup" produce the same slug, as do a category page and a post that happen to share a name.

Every CMS resolves this the same way, by appending a counter: part-1-setup-2. WordPress has done it since the beginning, and it is why the internet is full of URLs ending in -2 that nobody chose.

The counter is a fallback, not a fix. A slug ending in -2 tells a reader nothing and looks like a mistake, which it usually is: two posts that slug identically are often two posts that should have had more distinct titles in the first place. Converting a batch of titles at once is useful precisely because the collisions show up before anything is published, while the titles are still cheap to change.

Frequently Asked Questions

Related Tools

Keep Reading