Guide

How to Write URL Slugs That Rank

A URL slug is the readable part of a web address after the domain — the url-slug-best-practices in this page's address. It is a minor ranking factor and a significant usability one, and getting it right costs nothing if you decide before publishing.

The rules

Use hyphens, never underscores

Google treats hyphens as word separators and does not reliably split on underscores. So url-slug-guide is read as three words while url_slug_guide may be read as one. This has been Google's stated position for well over a decade.

Hyphens are also easier to read, and they survive being underlined by a link style — an underscore vanishes entirely under an underline.

Keep it lowercase

Many servers treat URLs as case-sensitive, so /About and /about can be two different pages serving identical content — a duplicate content problem you created for no reason. Lowercase everything, always.

Keep it short

Three to five words is a good target. Long slugs get truncated in search results, are awkward to share, and dilute the keyword signal. Strip filler:

  • Bad: /how-to-write-a-url-slug-that-will-rank-well-in-google-2026
  • Good: /url-slug-best-practices

Drop most stop words

Words like a, the, and, of, for add length without adding meaning. Remove them unless they change the sense — /the-office is not the same as /office.

Match the page, not the title exactly

Your slug should reflect the page's core topic, not mirror a long headline word for word. A title of "How Many Words Is a 5 Minute Speech? The Complete Guide" works fine as /how-many-words-is-a-5-minute-speech.

Avoid dates unless the content is genuinely time-bound

A slug containing /2026/ looks stale in 2027, and updating the article means either living with a wrong date or changing the URL. Keep dates out unless the page is genuinely an annual edition.

Strip accents and special characters

Accented characters get percent-encoded, so café becomes caf%C3%A9 — ugly to share and harder to read. Convert to plain ASCII. Ampersands, question marks, and spaces should never appear in a slug at all.

Generating slugs consistently

A slug is really just kebab-case — lowercase words joined by hyphens. Paste a headline into the kebab-case converter and it lowercases everything, replaces spaces with hyphens, and strips punctuation in one step.

For a batch of pages, paste one title per line and convert them all at once; line breaks are preserved so the result pastes straight back into your CMS or spreadsheet.

The mistake that actually costs you traffic

Everything above is worth a small amount. This one is worth a lot: changing URLs without redirecting them.

When a URL changes and the old one returns a 404, you lose every link pointing at it, every ranking it had accumulated, and every bookmark. This is the single most common way sites lose organic traffic during a redesign.

If you must change a URL, add a 301 permanent redirect from old to new. Google passes essentially all ranking signals through a 301, and it tells the crawler to update its index. Keep the redirect in place indefinitely — old links live for years.

Which leads to the practical takeaway: a mediocre slug you never change beats a perfect slug you migrate to. Decide before you publish, then leave it alone. If your existing URLs are merely imperfect rather than actively broken, the right move is usually to leave them exactly as they are.

Structure and depth

Shallow URLs are generally better — /tools/word-counter rather than /resources/free/text/tools/counters/word-counter. Depth itself is not a meaningful ranking penalty at two or three levels, but deep paths signal a page buried in your hierarchy, and they are harder to read and share.

Group related pages under a common path when it genuinely reflects your structure. That makes analytics easier to segment and gives users a URL they can truncate to navigate upward.

Checklist

  • Lowercase only
  • Hyphens between words, never underscores or spaces
  • Three to five meaningful words
  • Stop words removed unless they change the meaning
  • No dates unless genuinely time-bound
  • ASCII characters only
  • Decided before publishing, and 301-redirected if it ever must change

Try the tool

Convert text between 14 case formats instantly — free, no sign-up, and everything stays in your browser. Open the converter →

More guides