What Is a URL Slug? Definition, Examples, and Why It Matters

· 2 min read

A URL slug is the part of a web address that identifies a specific page in a readable form. In https://example.com/blog/what-is-a-url-slug, the slug is what-is-a-url-slug. It sits at the end of the path, and it is usually generated from the page's title.

The word comes from newspaper publishing: a slug was the short working name an editor gave a story before it had a headline. Web publishing borrowed the term for the short, working name a page carries in its URL.

What a slug is not

A slug is one component of a URL, not the whole address. Take this URL apart:

https://shop.example.com/products/espresso-machines?sort=price#reviews
Component Value
Protocol https
Subdomain shop
Domain example.com
Path /products/espresso-machines
Slug espresso-machines
Query string ?sort=price
Fragment #reviews

The slug is the final, page-identifying segment of the path. Query strings and fragments come after it and serve different jobs — passing data and pointing inside the page, respectively.

What a good slug looks like

Compare these two URLs for the same article:

example.com/p?id=48293&cat=7
example.com/blog/pour-over-coffee-guide

Both work technically. Only the second one tells a reader — and a search engine — what the page is about before it loads. Good slugs share five properties:

  1. Lowercase. URLs are case-sensitive after the domain, so /Guide and /guide can be different pages. Lowercase avoids accidental duplicates.
  2. Hyphen-separated. Google treats hyphens as word separators; underscores join words together. pour-over-coffee reads as three words, pour_over_coffee as one.
  3. Short. Search results display roughly 60 characters of a URL before truncating. Aim for 3–5 meaningful words.
  4. ASCII-only. Accented and non-Latin characters get percent-encoded when copied — café becomes caf%C3%A9 — which breaks the readability you were aiming for.
  5. Stable. A slug is a page's permanent name. Changing it later means redirects, and redirects leak both users and link equity when done carelessly.

Do slugs affect SEO?

Yes, in three modest but real ways. The slug is a ranking signal — a weak one, but keywords in the URL help search engines confirm what a page covers. It affects click-through rate, because a readable URL in a search result builds trust the way a readable street sign does. And it affects link sharing: URLs that look clean get pasted into chats, docs, and posts more readily than URLs full of %20 and query junk.

No slug will rescue thin content, and stuffing keywords into one (best-cheap-top-espresso-machine-review-2026-deals) reads as spam to both people and algorithms. Write the slug the way you would say the page's topic out loud, in four words or fewer.

Generating slugs correctly

Slugifying is deceptively fiddly: you need to lowercase, transliterate accents and non-Latin scripts, convert symbols like & into words, collapse whitespace and punctuation into a single separator, and optionally drop stop words like a and the. The slug generator handles all of it as you type, and the bulk version does the same for an entire content catalog at once.