What is a slug?
A slug is the part of a website’s URL that identifies a page and explains its content in a format that is easy to read for both humans and search engines. Slugs are simply strings with words separated by hyphens (
- this is a domain: techstacker.com
- this is a domain + slug: techstacker.com/what-is-a-slug-seo
For SEO, a slug should be short and concise, and only contain the most important words that reflect the title of the page.
For example, I recently published this tutorial about the JAMstack. Notice the slight difference between the title and the slug for that article:
- Title: “What is the JAMstack?
The “the” part is unnecessary in a slug. In general, filler words like “in”, “for”, “a”, “as” and so on is redundant in slugs. What’s important is that search engines understand what your content is about (to index it properly), and we do that by only including the most important words in slugs.