Blog
Hyphens vs Underscores in URL Slugs: What Google Says
The short answer: use hyphens. Google treats a hyphen as a word separator and an underscore as a character that joins words together, so /blue-running-shoes/ reads as three words and /blue_running_shoes/ does not.
Both characters are technically valid in a URL. Only one of them fits how search engines split a slug into words, and that difference has been documented by Google for well over a decade.
What Google says about the two characters
In a Google Search Central document on URL structure, the guidance is direct: use hyphens to separate words in a URL, and avoid underscores, because an underscore is treated as a word joiner.
The practical effect shows up in how a crawler reads the path. Given /content-writing-tips/, the words extracted are content, writing, and tips. Given /content_writing_tips/, the token is content_writing_tips, which matches almost nothing a person would search for. Google can still occasionally match underscored URLs, and it has improved at it over time, but you are relying on a fallback instead of using the format the engine asks for.
The same logic applies to other separators. Spaces encoded as %20 are ugly and create duplicate address variants. Plus signs are read as literal characters by some systems. Periods turn a slug into what looks like a file extension. Hyphens have no competing meaning in a path segment.
Why this matters for SEO
- Word boundaries give search engines clean tokens to index, which is how the words in the slug can support the page topic.
- Readable URLs earn more clicks on the results page and in forums, chat apps, and email, because people can see what they are about to open.
- Hyphenated slugs are easier to speak, dictate, and dictate back correctly when someone shares a link verbally.
- Consistency prevents duplicates. One page, one address, with no version split across underscore and hyphen variants.
None of this outweighs content quality. A slug is a small ranking signal at best, and it cannot rescue a thin page. It is simply a detail that costs nothing to get right the first time and is expensive to change afterwards, because changing a live URL means setting up a redirect.
Five practical rules for good slugs
- Separate every word with a hyphen, and never use underscores.
- Keep the slug short. Three to six meaningful words is usually enough, and stop words like "the" and "and" rarely earn their place.
- Use only lowercase letters, digits, and hyphens. Strip accents and punctuation, and replace ampersands with "and".
- Describe the page, not the campaign. "/email-marketing-checklist/" will still make sense in two years; "/email-marketing-checklist-v2-final/" will not.
- Decide the slug once. If you have to change a published URL, redirect the old address to the new one with a permanent 301.
One more habit worth keeping: avoid letting your CMS generate dates or IDs in the path. A slug that includes the publishing date makes evergreen content look stale, and IDs give readers no information at all.
Turning a headline into a clean slug by hand is tedious, and it is easy to leave behind a stray apostrophe or double hyphen. The Slug Generator does the conversion instantly, handling accents, punctuation, and repeated separators, entirely in your browser.