What is a Slug?
A slug is the URL-friendly version of a title or text. It appears in the address bar as part of a web page's URL. Good slugs are readable, SEO-friendly, and contain only safe characters for URLs.
For example, "10 Best Coffee Shops in NYC!" becomes 10-best-coffee-shops-in-nyc.
Slug Formatting Options
| Option | Input | Output |
|---|---|---|
| Hyphen separator | Hello World | hello-world |
| Underscore separator | Hello World | hello_world |
| Remove stop words | The Best Guide | best-guide |
🚀 SEO Best Practice
Keep slugs short (3-5 words), include target keywords, and use hyphens (Google's preference). Avoid underscores, numbers (unless meaningful), and filler words.
Why Slugs Matter for SEO
Readability
Users can understand what a page is about just by reading the URL. This builds trust and improves click-through rates from search results.
Keywords in URLs
Search engines consider URL keywords a ranking factor. A slug containing your target phrase helps with relevance signals.
Shareability
Clean URLs look professional when shared on social media, in emails, or in print. Long, ugly URLs with special characters look spammy.
Frequently Asked Questions
Should I include stop words?
Generally remove them for shorter URLs. "The" and "A" add length without SEO value. Keep them only if they're essential for meaning.
Hyphen vs underscore?
Google treats hyphens as word separators but underscores as word joiners. great-coffee = two keywords; great_coffee = one. Use hyphens.
Can slugs contain numbers?
Yes! Numbers are URL-safe. top-10-tips is perfectly valid and often used for list posts.