Clean URL - Wikipedia#Slug

Slug

A URL slug is usually the end part of the URL, especifically the part “path/pathinfo”, which can be interpreted as the name of the resource (similar to the basename in a filename or the title of a webpage). It is often described as the part of a URL that identifies a page in human-readable keywords,12 while others use a broader definition emphasizing that legible slugs are more user-friendly.34 The name slug is based on the usage by the news media to indicate a short name given to an article for internal use.5

Slugs are typically generated automatically from a page title but can also be entered or altered manually, so that while the page title remains designed for display and human readability, its slug may be optimized for brevity or for consumption by search engines, as well as providing recipients of a shared bare URL with a rough idea of the page’s topic. Long page titles may also be truncated to keep the final URL to a reasonable length.

Slugs may be entirely lowercase, with accented characters replaced by letters from the Latin script and whitespace characters replaced by a hyphen or an underscore to avoid being encoded. Punctuation marks are generally removed, and some also remove short, common words such as conjunctions. For example, the title This, That, and the Other! An Outré Collection could have a generated slug of this-that-other-outre-collection.

Another benefit of URL slugs is the facilitated ability to find a desired page from a long list of URLs without page titles, such as a minimal list of opened tabs exported using a browser extension, and the ability to preview the approximate title of a target page in the browser if hyperlinked without title.

If a tool to save web pages locally uses the string after the last slash as the default file name, like wget does, a slug makes the file name more descriptive.

Websites that make use of slugs include Stack Exchange Network with question title after slash.6

Printed 2026-07-08.

(echo:: @ )

Footnotes

  1. “WordPress Glossary”. 18 November 2018. Retrieved 26 July 2025.

  2. “Glossary | Django documentation”. Django Project. Retrieved 26 July 2025.

  3. Pavlik, Vlado (20 August 2024). “What Is a Slug? URL Slugs and Why They Matter for SEO”. Semrush Blog. Retrieved 26 July 2025.

  4. “Slug - Glossary | MDN”. developer.mozilla.org. 11 July 2025. Retrieved 26 July 2025.

  5. Davey, Lizzy (15 January 2024). Matherson, Nate (ed.). “What is a URL Slug? 9 Best Practices for SEO”. Positional. Retrieved 1 January 2026.

  6. “Question URL slugs based on title”. Meta Stack Exchange. 10 October 2011.