Keywords in URLs for SEO: Do They Help, and How to Build a Good Slug

Last reviewed: July 2026. By Christoph Olivier, Founder, CO Consulting.
Keywords in URLs for SEO help a little, not a lot. Google treats the words in a URL slug as a very lightweight ranking signal, so the real payoff is a short, readable slug that earns clicks and trust in search and in AI answers. This guide gives you the honest weight, the slug rules that matter, and the one decision most people get wrong: whether to change a URL that already ranks.
Most slug guides oversell the ranking win and skip the risky part. I run these decisions on real client sites, so this page separates the small direct benefit from the bigger indirect one, then walks the change-or-keep call step by step.
Do keywords in URLs help SEO?
Yes, but only slightly for rankings. Google’s John Mueller has called keywords in URLs “overrated” and described slug words as a “very, very lightweight ranking factor.” The bigger, more reliable gain is indirect: a clear slug tells a searcher what the page is before they click, which lifts click-through and trust. So keep the keyword in the slug when it fits naturally, and stop optimizing there.
Think of the slug as a label, not a lever. The title tag and headings carry far more direct weight. If you are deciding where to spend an hour of on-page effort, the URL is near the bottom of the list.
What a good SEO slug looks like
A good slug is short, lowercase, hyphenated, and built from the page’s main keyword with the filler removed. The target is roughly three to five words and under 60 characters, so the whole thing reads at a glance in a browser tab or a search result. Descriptive beats clever, because both people and AI crawlers use the slug to judge relevance fast.
Here is the difference in practice:
| Weak slug | Better slug | Why |
|---|---|---|
| /blog/post?id=48213 | /keywords-in-url-for-seo/ | Readable, descriptive, no ID string |
| /the-ultimate-guide-to-writing-a-great-seo-url-slug-in-2026/ | /seo-url-slug-guide/ | Under 60 chars, filler removed |
| /seo_url_slug/ | /seo-url-slug/ | Hyphens, not underscores |
| /SEO-Slug-Tips/ | /seo-slug-tips/ | Lowercase avoids duplicate-URL risk |
Slug rules that actually matter
Six formatting rules cover almost every slug you will ever write. They come straight from Google’s URL structure guidance and years of watching what breaks on real sites. Follow them once and you never think about slugs again.
- Include the main keyword. Use it once, naturally. Do not repeat it or chain variations.
- Keep it short. Aim for three to five words and under 60 characters. Ahrefs’ study of over a billion pages found a measurable ranking drop past roughly 115 characters, mostly because long URLs carry junk.
- Use hyphens, never underscores. Google reads a hyphen as a word separator and an underscore as a word joiner, so
seo_url_slugcan be read as one word. - Use lowercase only. Mixed case can create duplicate URLs and avoidable 404s on some servers.
- Cut stop words. Drop a, and, the, of, to unless removing them changes the meaning. This is readability, not a ranking trick.
- Skip dates and numbers you may regret. A year in the slug forces a redirect every time you refresh the page.
These same habits feed how you place terms elsewhere on the page. If you want the full map of where keywords belong beyond the URL, see our guide on how to add SEO keywords to your website.
Does slug length affect SEO?
Length is not a direct ranking factor, but longer URLs correlate with lower rankings. Google uses the URL as an identifier, so a 20-character slug and a 90-character slug can both rank. The pattern in large studies is that very long URLs tend to be stuffed with extra folders, parameters, and repeated words, and that clutter is the real drag. Keep it under 60 characters and length stops being a question.
Short also wins where humans and AI copy links. A tidy slug survives being pasted into a chat, a citation, or a social post without turning into a wall of characters. That matters more each year as AI answer engines cite sources and surface the URL alongside the mention.
Should you change a URL that already ranks?
Usually no. Changing the slug on a page that already ranks carries real downside and rarely a real gain. Mueller’s own framing is blunt: some risk, usually no visible reward, and the site can dip while Google reprocesses the change. Only rewrite a live URL when the current one is genuinely broken, misleading, or unreadable, not because you found a slightly nicer keyword.
Use this quick test before touching a ranking URL:
| Situation | Change the slug? |
|---|---|
| URL is a random ID or gibberish string | Yes, worth it |
| URL has the wrong topic or an old product name | Yes, if it misleads |
| URL works but you thought of a better keyword | No, leave it |
| URL has a year that is now outdated | Maybe, only if you cannot future-proof another way |
| Page ranks well and reads fine | No, do not touch it |
If you do change it, redirect properly. Set a 301 redirect from the old URL to the new one on a per-page basis, then update your internal links so they point straight at the new slug. The 301 passes the accumulated authority forward and stops the old links from 404ing. Skipping the redirect is how people lose rankings during a slug change, not the change itself.
Set slugs right the first time
The clean move is to get slugs right at publish, so you never face the change-or-keep dilemma. Decide the target keyword before you write, build a short hyphenated slug from it, and lock it in. Getting this wired into your publishing checklist is part of a broader Google SEO workflow, and it is exactly the kind of low-drama, compounding fix we build into client sites through our growth consulting engagements.
The whole topic fits in one sentence: write the slug for the reader, keep the keyword in it because it costs nothing, and stop optimizing there.
Frequently asked questions
Do keywords in URLs help SEO in 2026?
Yes, slightly. Google treats slug keywords as a very lightweight ranking signal, so including your main keyword helps a little directly and more indirectly through readability and click-through. It is worth doing because it is free, but it is not a place to spend real optimization effort. Your title tag, headings, and content carry far more weight.
How long should a URL slug be?
Aim for three to five words and under 60 characters. Length itself is not a direct ranking factor, but very long URLs correlate with lower rankings because they usually carry clutter. Short slugs are also easier to read, remember, and paste into chats, citations, and social posts, which matters more as AI search surfaces raw URLs.
Should I use hyphens or underscores in URLs?
Always use hyphens. Google reads a hyphen as a word separator, so seo-url-slug is understood as three words. It reads an underscore as a word joiner, so seo_url_slug can be treated as one word and lose the keyword signal. Hyphens are the documented Google standard for separating words in a slug.
Will changing my URL hurt SEO?
It can, if you do it without redirects or without a good reason. Changing a slug on a ranking page carries risk and usually no gain, and the page may dip while Google reprocesses it. If you must change it, set a per-page 301 redirect from old to new and update internal links so authority carries forward and old links do not break.
Where else should the keyword go besides the URL?
Put your keyword in the title tag first, then the H1, an H2 or two, the opening sentence, the meta description, and image alt text, each once and naturally. The URL is a minor slot in that map. Overdoing any one placement, including the slug, reads as stuffing and does more harm than the tiny signal it adds.
