What is a Slug? | Glossary

Glossary

What is a Slug?

A slug is the readable part of a URL that names one specific page, like "spring-menu" in example.com/blog/spring-menu. How to write good slugs.

A slug is the short, human-readable label at the end of a web address that identifies one particular page. In example.com/blog/spring-menu, the slug is spring-menu. The name comes from newspaper publishing, where a "slug" was the short working title editors used to track a story.

Where slugs come from and how they are used

Most content systems create a slug automatically from the page title: they lowercase it, swap spaces for hyphens and strip punctuation, so "Our Spring Menu!" becomes our-spring-menu. You can usually edit it before publishing. When a request arrives, the site looks up which page owns that slug and renders it. That is why slugs must be unique within the same section: two posts cannot both be /blog/spring-menu.

The slug is one segment of the full URL. Together with the folder-like path before it, it forms the page's permalink.

A before-and-after example

An accountant publishes a post titled "5 Things Every Freelancer in Ontario Should Know Before Filing Their Taxes This Year". The auto-generated slug is 5-things-every-freelancer-in-ontario-should-know-before-filing-their-taxes-this-year. Trimmed by hand to freelancer-tax-filing-ontario, it is easier to read in a search result, easier to share, and it will not look wrong if the post is updated to "7 things" next year.

Writing a good slug

  • Describe the page in a few words, using the term people search for.
  • Lowercase letters, numbers and hyphens only. Google recommends hyphens over underscores to separate words.
  • Drop filler words like "a", "the" and "and" when the meaning survives.
  • Leave out years, counts and anything likely to change.

Slugs are a small part of on-page SEO. A clear slug helps people decide to click, but it will not make a weak page rank.

When to leave slugs alone

Getting the slug right matters most at the moment a page is first published. Once a page has links and search traffic, rewriting its slug for a tiny keyword tweak is rarely worth it. If you must change it, add a 301 redirect from the old address.

Common slug mistakes

  • Keeping auto-generated slugs that are 15 words long or end in -2 because a draft already used the name.
  • Changing a live slug without a redirect, creating a 404 for everyone who had the old link.
  • Using spaces, capitals or accented characters, which get percent-encoded into messy addresses.
  • Repeating the folder name, as in /services/plumbing-services.

Related terms

  • URL: the full address a slug sits inside.
  • Permalink: the stable address built from the slug.
  • On-page SEO: where slug choices fit in.
  • 301 redirect: what to add when a slug changes.

Ready to put this into practice?

We.Inc lets you describe a site in chat and watch AI build it live, then refine it visually or in code.

Start Building

No credit card required

Describe your business. Get a website ready to publish.

Ready to simplify everything?

Join 15,000+ businesses that replaced their entire marketing stack with one platform.

No credit card required · Talk to sales

Product

Who It's For

Features

Resources

Company

View Sitemap