What is a URL slug?
The slug is the part of a URL that names the page. In riot.nyc/glossary/url-slug/ the slug is url-slug. It is usually generated from the page title, lowercased, with spaces turned into hyphens and punctuation stripped, and it is the one piece of the address a writer or editor gets to choose. Everything before it (the domain, the folder path) is set by the site's structure; the slug is set per page.
Good slugs are short, readable and specific. "url-slug" says what the page is. "post-10301" says nothing, and "the-ultimate-guide-to-understanding-what-a-url-slug-is-and-why-it-matters" says it badly. The word comes from newspaper production, where a slug was the short label given to a story while it moved through the newsroom.
Why it matters
Why a URL slug matters
The slug is visible in the results page, in the browser bar, in a shared link and in the hover text on a mouse, and in every one of those places it is a tiny piece of copy that tells people what they are about to get. A clear slug gets clicked more and trusted more. Search engines read it too; the words in the slug are a modest ranking signal and, more importantly, a confirmation that the page is about what its title claims.
Slugs are also permanent in a way titles are not. A title can be rewritten a dozen times without consequence; changing a slug changes the address, breaks every existing link to the page and requires a redirect. The choice is worth a moment's care at the start.
In practice
How a URL slug works in practice
- 01
The slug is written when the page is created, before publishing. It takes the main keyword for the page and little else: lowercase, hyphens between words, no stop words unless they are needed for sense, no dates unless the page is genuinely about a date, no numbers that will go stale, no special characters. Three to five words is a comfortable length. The slug should match the title's meaning without duplicating the whole title.
- 02
After publishing, the slug is left alone. If it has to change, because the page has been repurposed or the original was a mistake, the old address is redirected to the new one with a 301, and internal links are updated to point directly at the new slug rather than through the redirect. Content management systems generate a default slug automatically; the discipline is to edit it before the page goes live, not after.
At RIOT
URL slugs at RIOT
Every term in this glossary lives at riot.nyc/glossary/ followed by its slug, and the slug is the term itself: url-slug, structured-data, technical-seo. It is the plainest possible address, which means a person can read it, a search engine can read it, and a link to it says what it points at before anyone clicks.
Watch out
What people get wrong about URL slugs
Leaving the default. Many platforms generate a slug from the full title, including every stop word, or from an ID number, and neither gets edited before publishing. The other mistake is stuffing: a slug with the keyword three times reads as spam to people and engines alike. And editors change slugs on live pages to "improve SEO", breaking inbound links for a benefit that is close to zero. Choose once, choose well, leave it.





