In this article
What a slug is
In example.com/blog/how-to-bake-bread, the slug is how-to-bake-bread. It identifies one page within your site. WordPress, Shopify and most website builders create a slug automatically from the title, but the automatic version is often too long or full of filler words.
Rules for good slugs
- Use lowercase letters, numbers and hyphens only.
- Use hyphens, not underscores. Google’s own URL guidance recommends hyphens to separate words; underscores can make words run together.
- Keep it short and descriptive, 3 to 6 words is usually enough.
- Include the main topic words people would search for.
- Leave out dates unless the page is truly about a date; “best-phones” stays useful longer than “best-phones-2026”.
- Avoid accents and symbols. “Crème brûlée” becomes
creme-brulee.
Examples
| Title | Poor slug | Good slug |
|---|---|---|
| 10 Easy Ways to Save Money on Groceries in 2026! | 10-easy-ways-to-save-money-on-groceries-in-2026 | save-money-on-groceries |
| What Is a VAT Invoice & How Do I Make One? | what-is-a-vat-invoice-how-do-i-make-one | vat-invoice |
| Café Menu, Winter Specials | caf%C3%A9-menu | cafe-winter-menu |
Good and bad slug examples
| Page | Weak slug | Better slug |
|---|---|---|
| Blog post “10 Easy Ways to Save Money on Groceries in 2026” | /p=4821 | /save-money-on-groceries |
| Product “Nike Air Zoom Pegasus 41 Men’s Running Shoe” | /product/NIKE_AIR_ZOOM_PEGASUS_41_MENS | /nike-pegasus-41-mens |
| Category “Kitchen & Dining” | /cat/kitchen%20%26%20dining | /kitchen-dining |
Leaving the year out of the slug means the same address still fits when you update the post next year.
How to generate slugs
- Paste a title (or many, one per line) into the Slug Generator.
- Choose whether to remove stop words like “the”, “a” and “of”.
- Set a maximum length, the tool trims at word boundaries so words are not cut in half.
- Copy the slug into your CMS.
Symbols are handled sensibly: “&” becomes “and”, “%” becomes “percent”, and accents are removed.
Should I change an existing slug?
Changing the slug of a published page breaks every link to it, from other sites, social posts and bookmarks, unless you add a redirect. Only change slugs when there is a clear benefit, and always set up a 301 redirect from the old address. On WordPress many SEO plugins do this automatically; on Apache servers, the .htaccess Redirect Generator writes the rules for you.
Slugs for categories and products
Online shops benefit from consistent patterns: /category/product-name, with the product name kept short and free of sizes or colours that change. For variants, use one page with options rather than a new slug for each colour. Category slugs should be plural nouns people search for, such as mens-shoes or school-bags, not internal codes.
Slugs in non-English languages
Search engines handle URLs in any language, but non-Latin characters are converted to long percent codes when copied, such as %D8%A7. For sharing, a short transliterated or English slug is usually tidier, even if the page itself is in Urdu or Arabic.
Slugs are one small part of SEO
A good slug helps, but titles, content and links matter far more. Pair your slug with a strong title and description using the Meta Tag Generator, and check the full address with the URL Parser if it contains tracking parameters.
Frequently asked questions
What is a URL slug?
The part of a web address after the domain that names a page, such as how-to-compress-pdf.
How long should a slug be?
Short and clear, usually three to six words.
Should I use hyphens or underscores?
Use hyphens. Google reads hyphens as word separators.
Can I change a slug after publishing?
Yes, but set up a 301 redirect from the old address so links and rankings are not lost.
Should slugs include stop words?
Remove small words such as a and the when the slug stays clear without them.
What is a slug in SEO?
It is the part of the URL that identifies a single page. A clear slug with the main keyword helps people and search engines understand what the page is about before they open it.
Should a URL slug use hyphens or underscores?
Use hyphens. Search engines treat a hyphen as a space between words, while an underscore can join words together.
How long should a URL slug be?
Short enough to read at a glance, usually three to six words. Drop filler words like a, the and of unless they change the meaning.