Tldr

Slug is the unique, human-readable part of a web address that comes after the domain name, making each page distinctly identifiable.

What’s Slug?

  • Imagine a slug as the “nickname” for a specific page on a website. It’s the unique part of a URL that helps you understand what the page is about at a glance.
  • You’ll usually find it right after your domain name, like in example.com/your-page-name. Here, your-page-name is the slug.
  • While slugs often mirror the page’s title, they don’t have to. They just need to be unique for that particular website.

Slug vs. Headings

  • Sometimes, you’ll see a URL with a # symbol, like example.com/your-page-name#section-1.
  • In this case, your-page-name is still the slug, uniquely indetifying the entire page.
  • The part after the # is actually a heading or an anchor link that points to a specific spot within that page. It helps you jump directly to a particular section of the page.

See also

https://developer.mozilla.org/en-US/docs/Glossary/Slug
https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Writing_style_guide#slugs
https://stackoverflow.com/questions/427102/what-is-a-slug-in-django