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 characters get percent-encoded into unreadable soup (cafe%CC%81), so transliterate accents down to ASCII unless the whole site is in a non-Latin script and the audience expects it.
Ask AI for it
Add slug generation to this project. Derive a URL slug from each title by lowercasing, transliterating accented characters to ASCII, 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. 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.