A URL slug is the segment of a web address that identifies a specific page in a readable way, typically appearing at the end of the path. In example.com/blog/how-to-write-a-slug, the slug is how-to-write-a-slug. A good slug is lowercase, uses hyphens to separate words, avoids stop words and special characters, and describes the page's content clearly.
Slugs matter for both usability and SEO. A descriptive slug tells users and search engines what a page is about before they even load it, and it appears in search results, making the URL itself a small ranking and click-through signal. Clean slugs are also easier to read aloud, remember, and share than URLs full of query parameters or numeric IDs.
Creating a slug from a title is a process called slugification: convert the text to lowercase, replace spaces with hyphens, transliterate or strip accented and non-ASCII characters, and remove punctuation. The goal is a compact string that stays valid in a URL without needing percent-encoding, while remaining meaningful to a human reader.
Best practices include keeping slugs short, front-loading important keywords, and — critically — not changing them after publication. Changing a slug breaks existing links and bookmarks unless you set up an HTTP redirect from the old URL to the new one. When restructuring a site, mapping old slugs to new ones with 301 redirects preserves both traffic and accumulated SEO value.