You change a page title, publish, and forget the URL. Three months later you wonder why the page that used to rank sits on page two. Nine times out of ten, the culprit is the slug: a string of stop words, a date, a category stacked on a category, or an auto-generated /?p=1847 that tells Google absolutely nothing about the page.
Getting URL slugs right is one of the cheapest wins in technical SEO. It takes minutes, needs no budget, and stays done. But most guides only tell you the obvious (lowercase, hyphens, short). They skip the part that actually bites: what happens when you change a slug on a page that already ranks, how to handle accented characters, and how to stop the same content living at five different addresses.
Key Takeaways
- A slug is the variable tail of a URL, and it should describe the page in two to five words.
- Hyphens, lowercase, no stop words. That part is uncontroversial.
- Changing a slug without a 301 redirect throws away whatever authority the page had built.
- One page, one address. Duplicate slugs and tracking parameters split signals.
- Accented and non-Latin characters need transliteration, not raw encoding.
What is the best URL structure for SEO?
There is no magic formula. There is a hierarchy that makes sense to a human reading it out loud. That is the whole test: if you had to dictate a URL over the phone, would the other person type it back correctly on the first try?
A predictable pattern looks like this:
- Domain — fixed, never part of the slug discussion.
- Section folder —
/blog/,/guides/,/products/. One level is usually enough. - Slug — the descriptive part.
- Parameters and fragments — tracking, filters, anchors. These should never define the page identity.
The structure, broken down
Take https://example.com/blog/url-slug-structure. The protocol and domain are constants. /blog/ tells both the crawler and the visitor where in the site they are. url-slug-structure is the slug, and it is the only part that changes page to page. Everything after a ? is a parameter and, in SEO terms, noise.
The mistake I see most often is folders stacking up like a filing cabinet: /blog/2024/03/category/subcategory/the-actual-post. I did this on my own site early on, convinced the date helped readers browse by recency. It didn't. It just meant every URL contained two numbers that would eventually be wrong, and when I wanted to refresh old posts, the URLs carried a stale date into new shares. I stripped the dates and moved posts one level up. Cleaner, and nothing broke because I redirected properly.
How deep should a URL go?
Shallow. Two clicks from the homepage is comfortable; three is tolerable if the content genuinely sits that deep. Beyond that, you are mostly punishing yourself, because moving a page later means rewriting a longer chain. Depth is not a ranking switch you flip — it is a maintenance cost you pay forever.
How to make a URL slug
Here is the sequence I run through for every new page. It takes under a minute once it is a habit.
- Start from the page title, then cut it down to the words someone would search. The title can be poetic; the slug cannot.
- Drop stop words — "the", "a", "of", "for", "and", "to". They add length and nothing else. One exception: if removing a word makes the meaning ambiguous, keep it.
- Lowercase everything. Mixed case creates a second address for the same page on case-sensitive servers.
- Use hyphens between words, never underscores. Google treats a hyphen as a word separator; an underscore glues words together.
- Strip accents and special characters. "Café crème" becomes
cafe-creme. - Read it aloud. If it sounds like a robot mashing keywords, shorten it.
How long should a slug be?
Short enough to stay visible in a search result without being truncated, which in practice means roughly three to five words. The exact character count matters less than the discipline it forces. A slug like how-to-write-url-slugs-that-rank-better-in-google-search-2026 is a confession that the writer did not decide what the page was about.
And please — no keyword stuffing. seo-url-slug-seo-best-url-seo is a pattern Google has seen a few million times and it reads as spam to a human deciding whether to click. The slug's job is clarity, not repetition.
Should you use a slug generator?
Most CMS platforms generate the slug automatically from the title. That is fine as a starting point and almost always wrong as a final answer, because the auto-generated version inherits every stop word and every stylistic flourish of the title. My routine: let the CMS draft it, then edit it down by hand. A generator saves keystrokes; it does not make editorial decisions.
Changing a slug on a page that already ranks
This is where the real damage happens, and it is the part most tutorials skip entirely.
When you change a slug, the old address does not exist anymore. Every internal link pointing to it, every external link, every bookmark, and every social share now hits a dead end. Google eventually notices the old URL returns a 404, drops what it knew about that address, and re-evaluates the new one from scratch. Months of accumulated trust, gone because nobody set up a redirect.
The fix is boring and it works:
- Set a 301 redirect from the old slug to the new one before you publish.
- Update internal links so they point at the new address directly, not through the redirect.
- Keep the redirect in place permanently. Do not "clean up" old redirects after a few months.
- Update the canonical tag on the page to the new URL.
- Resubmit the sitemap so the new address is picked up quickly.
I once changed three slugs in one afternoon and set up redirects for two. The third was a page I had published the week before and assumed nobody had linked to. Someone had — a small newsletter in my niche. That page lost its traffic and took months to climb back. Not a disaster, but entirely avoidable, and the lesson stuck: redirect first, edit second, never the other way around.
Should you change slugs at all?
Only when the current one actively hurts you: it contains a date, it contains a misspelling, or it describes content that has changed completely. A cosmetic preference is not a reason. Every redirect is a small piece of debt, and the interest is paid by your crawl budget and your link equity.
One page, one address
Duplicate slugs are sneakier than they look. Your site can serve the same content at several URLs without anyone noticing: a trailing slash variant, a capitalized version, a version with ?utm_source=newsletter, a version with a category prefix. Each one is a separate address as far as a crawler is concerned, and the signals get split between them.
| Variant | What it causes | What to do |
|---|---|---|
| Trailing slash duplicate | Two versions of the same page | Pick one and redirect the other |
| Uppercase slug | Separate address on case-sensitive servers | Force lowercase at the server level |
| Tracking parameters | Endless near-duplicates from shares | Canonical to the clean URL |
| Category prefix | Same post at two addresses | Choose one pattern, redirect the rest |
My rule: never let a parameter define identity. A page's canonical address is the bare slug, always. Marketing tags ride on top and get stripped in the canonical tag.
What about accented and non-Latin characters?
Transliterate. A URL containing raw percent-encoded bytes for accented letters is technically valid and practically horrible — nobody shares it, and it looks broken in a chat window. Convert to the closest ASCII equivalent: é becomes e, ü becomes ue or u depending on your convention, and non-Latin scripts get romanized. If you run a multilingual site, keep one slug per language and wire them together with hreflang so each language version is treated as its own page rather than a duplicate.
One caveat worth stating plainly: URL structure is a small ranking factor. Content quality, internal linking, and page experience do the heavy lifting. Slugs are hygiene — but hygiene you only have to do once, and neglect compounds.
What is the 80/20 rule in SEO?
The principle is straightforward: a small share of your pages drives most of your organic traffic, and a small share of your effort produces most of your results. In practice, when you look at a site's analytics, you will usually find that a handful of pages account for the bulk of visits, while a long tail of posts collects almost nothing.
Applied to URLs, it means something specific: do not optimize the slugs of pages that get no traffic. Spend that attention on the twenty pages that actually earn. Better yet, audit your existing URLs once, fix the ones that matter, and set a clean default so new pages never create the problem again. Fixing a date-stamped slug on a page with three visits a year is busywork.
Honestly, this rule is why I stopped obsessing over perfect URLs for every new post. I now spend that energy on internal links to my best pages instead. Those moved the needle; the slug polish mostly did not.
The slug is a promise
A good URL is a small contract with your reader: this address will still work, it will still say what the page is about, and it will not change because you felt like renaming something on a Tuesday. Keep it short, keep it lowercase, redirect when you break the promise, and never let the same page answer to two names.
The next time you hit publish, take ten extra seconds to look at the slug field. That string outlives the title, the meta description, and the featured image. Most of what you write will be rewritten. The URL, if you get it right the first time, you will never have to touch again.