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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
These terms show up next to slugs, and each one covers a different part of the address:
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.