Snoika
Glossary·SEO fundamentals

What is a URL slug

Definition

A URL slug is the part of a web address that names one specific page in plain words.

It comes after the domain and any folders. In example.com/glossary/what-is-a-url-slug, the slug is what-is-a-url-slug. Before anyone clicks, the slug shows people and search engines what the page covers. Most site owners set it once, when they publish.

TermURL slug3 min read · reviewed by the Snoika team

URL slug defined

A URL slug is only the unique label at the end of the path. The rest of the address isn't part of it. A content management system (CMS) such as WordPress writes a draft slug from the page title, in lowercase with hyphens in place of spaces. You can edit that draft before you publish. Each slug has to be unique within its folder, because two pages can't share one address.

Why it's called a slug

The word comes from newspapers. Editors gave every story in progress a short working label, its slug, so reporters and typesetters could track it before the headline was final. Web publishing tools took the term for the same job, a short and stable label for one piece of content. The headline can change later and the slug stays put.

How a slug works

When a browser requests a URL, the server reads the slug and looks up the page stored under it. In a CMS, the slug sits in the database next to the page content. If you change the slug, you change where the page lives. The old address then returns a 404 (not found) error, unless you set up a permanent 301 redirect from the old slug to the new one.

Slug vs full URL

A slug is one segment of a full URL. The full URL is the complete address that locates the page. Take https://example.com/blog/seo/url-slugs. It opens with the protocol and domain, https://example.com, followed by the path /blog/seo/url-slugs. Only the last segment, url-slugs, is the slug. The domain is shared by every page on a site, but you choose the slug page by page.

Why slugs matter for SEO

In SEO, a slug names the page topic in words a search engine can read, and searchers see it in the result before they click. Google's URL guidance recommends simple, descriptive words over long ID numbers. A slug like p?id=4821 tells the reader nothing, while running-shoes-flat-feet tells them what the page covers.

Slugs in AI search visibility

The content of a page decides whether an AI assistant cites it. When an assistant like Perplexity shows its sources, a clear slug in the visible link tells readers the citation fits their question. A slug made of ID numbers looks random, which discourages readers from clicking it.

Writing an effective slug

A good slug for SEO is short and built around the main topic of the page. Most bad slugs come from leaving the CMS draft as it is.

Which words to keep

Start with the main keyword and cut the rest. Leave out stop words like "the" and "and" unless the meaning breaks without them. Dates go too, because a guide you plan to update shouldn't carry an old year in its address. So "10 best ways to clean a cast iron pan in 2025" becomes clean-cast-iron-pan.

How to format it

Separate words with hyphens. Google recommends hyphens over underscores because hyphens mark where one word ends. Write the slug in lowercase, since some servers treat Page and page as two different addresses. And keep symbols like & or % out of it.

When to change a slug

Leave a published slug alone unless it's wrong or misleading. A small gain from a better keyword rarely makes up for the redirect work and the risk of broken links.

Related URL terms

These terms show up next to slugs, and each one covers a different part of the address:

Permalinkthe full, permanent URL of a post, slug included. A CMS also uses the word for its URL format setting.
URL patheverything after the domain, folders included. The slug is its last segment.
Query stringthe part after a question mark, such as ?color=red. It filters or tracks a page without naming it.
Canonical URLthe version of an address you ask search engines to index when several URLs show the same content.
301 redirectthe permanent forward from an old address to a new one. You need one whenever a slug changes.

You now know what is a URL slug and how it differs from the terms above. Open five recent pages on your own site and check each slug against the formatting rules. Then fix the slug on any draft before it goes live.

Slugs are one of the basics covered in our SEO guide for B2B teams.

See how AI talks about your brand

Get free audit