What Is a URL Slug? (And How to Write a Good One)

A URL slug is the readable part of a web address that identifies a specific page — usually the text after the last slash. For a post titled "How to Brew the Perfect Coffee," the slug might be how-to-brew-the-perfect-coffee, making the full URL clean, memorable, and descriptive. Here's what a slug is, why it matters for SEO, and how to write a good one.

Key takeaways

  • The slug is the page-identifying part of a URL, usually after the last slash.
  • Good slugs are short, lowercase, hyphenated, and keyword-rich.
  • Use hyphens (not underscores) and avoid spaces, accents, and symbols.
  • Turn any title into a clean slug with the slug generator.

Where the slug sits in a URL

Take this address: https://example.com/blog/how-to-brew-coffee. The bold part is the slug — the human-readable label for that specific page. Everything before it (the domain and folders) locates the site and section; the slug names the page itself. A clean slug tells both people and search engines what the page is about before they even click.

Why slugs matter for SEO

The URL is a small but real ranking and usability signal:

  • Relevance. A slug that includes your target keyword reinforces what the page is about.
  • Click-through. Clean, descriptive URLs look more trustworthy in search results than long strings of numbers and symbols.
  • Shareability. A readable slug is easier to share, remember, and link to.

Compare /blog/how-to-brew-coffee with /blog/?p=8412 — the first tells you exactly what you'll get.

Create a clean slug: the free Slug Generator turns any title into a tidy, URL-safe slug — lowercase, hyphenated, with accents simplified and symbols removed.

How to write a good slug

  • Keep it short. A few meaningful words beat a full sentence. Trim filler like "a," "the," and "how to" if it's still clear.
  • Use lowercase and hyphens. Separate words with hyphens — Google reads them as spaces. Avoid underscores, which it treats as joiners.
  • Include your keyword. Put the term people search for in the slug.
  • Drop special characters. Spaces, accents, and symbols get percent-encoded into ugly strings like %20. Stick to letters, numbers, and hyphens.
  • Set it once. Changing a published slug breaks existing links, so pick a good one up front (or set up a redirect if you must change it).

Frequently asked questions

What is a URL slug?

A URL slug is the readable part of a web address that identifies a specific page, usually the text after the last slash. For a post titled "How to Brew Coffee" the slug might be how-to-brew-coffee.

What makes a good SEO-friendly slug?

Keep it short and descriptive, use lowercase letters with hyphens between words, include your main keyword, and drop filler words. Avoid spaces, accents and special characters.

Should I use hyphens or underscores in a slug?

Use hyphens. Google treats hyphens as word separators but underscores as joiners, so word-separated slugs read better to both search engines and people.

Related: Slug Generator · Meta Tag Generator · all Text Tools