Slug
The human-readable words at the end of a URL, like /blog/how-to-bake-bread. What you write instead of ?post_id=4718.
See it
What it is
A slug is the last human-readable segment of a URL path: the 'how-to-bake-bread' in /blog/how-to-bake-bread. It is normally derived from the title by lowercasing it, turning spaces into hyphens, and stripping punctuation. Most CMSs generate one automatically and let you override it, and you usually should, because the automatic version is the entire headline including 'the' and 'a' and a colon.
Good slugs are short, lowercase, and hyphenated. Use hyphens, not underscores: search engines read a hyphen as a word break and an underscore as glue, so 'bake_bread' reads as one word. Drop dates and database IDs unless you genuinely want /2019/ hanging off a page you will still be updating in 2027. Above all, keep slugs stable: a slug is a public address, and editing one silently breaks every link anyone ever shared.
Two traps. When you do have to change a slug, the old URL does not politely retire, it 404s until you add a 301 redirect from old to new. And non-ASCII slugs are a choice, not a defect. Modern URLs carry UTF-8 fine, browsers usually display the readable Unicode back to the reader, and search engines cope. The wire format is percent-encoded (cafe%CC%81), which is what makes people panic, and it is a real annoyance if your analytics, spreadsheets, or support tooling mangle it. Transliterate down to ASCII when your audience or your stack prefers it, not because SEO demands it.
Ask AI for it
Add slug generation to this project. Derive a URL slug from each title by lowercasing, replacing every run of non-alphanumeric characters with a single hyphen, trimming leading and trailing hyphens, and truncating to roughly 60 characters at a word boundary. Put ASCII transliteration behind a flag rather than hardcoding it, since UTF-8 slugs are perfectly valid and may read better for a non-Latin audience. Store the slug as an editable field on the record so authors can shorten it, enforce uniqueness by appending a numeric suffix on collision, and when an existing slug changes, keep the old value in a history table and serve a 301 redirect from the old URL to the new one.