What is a URL slug?
A slug is the last part of a URL, after the domain and any folders, that identifies one page. In example.com/blog/keyword-research-guide, the slug is keyword-research-guide.
Most CMS platforms, including WordPress, Shopify, Webflow and Ghost, create a slug from your title automatically. Those automatic slugs are often long, full of filler words, and sometimes contain dates or characters you didn't intend. Writing it yourself takes ten seconds and lasts as long as the page does.
How to create an SEO-friendly slug
A good slug describes the page in as few words as it takes, using words people actually search for.
- 1Start from the page's main keyword, not the full headline
- 2Keep it short: three to five words is enough for most pages
- 3Use lowercase letters, numbers and hyphens only
- 4Separate words with hyphens, not underscores or spaces
- 5Leave out dates and anything else that will change
- 6Check it still reads naturally to a person, not just a search engine
Hyphens or underscores?
Use hyphens. Google's URL structure guidelines say so directly: hyphens help people and search engines see where one word ends and the next begins, and underscores don't do that as reliably. Spaces become %20 in a URL, which is worse than either.
Should a slug include the keyword?
Yes, when it fits. Google has said that words in the URL are a very small ranking signal, so a keyword in the slug won't move rankings much on its own. The bigger benefit is to people: a descriptive slug in a search result or a shared link tells them the page matches what they want.
Don't stuff it. One phrase is enough. keyword-research-guide reads well. keyword-research-keyword-tool-free-keywords reads as spam.
Stop words: keep or remove?
Stop words are short, common words like a, the, of, and and for. Removing them makes slugs shorter, and turning best-way-to-learn-the-guitar into best-way-learn-guitar loses nothing.
Keep them when they change the meaning or the slug stops reading naturally. how-to-start-a-blog is clearer than start-blog, and "how to" is often part of the search itself. The toggle never removes every word, so a slug can't end up empty.
Changing a slug on a live page
A slug change is a URL change. The old address stops working unless you redirect it, and any links, bookmarks and rankings pointed at it are lost.
If you must change one, set up a permanent (301) redirect from the old URL to the new one, update your internal links and sitemap, and expect a short settling period in search. For pages that already get traffic, a slightly imperfect slug is usually better left alone.
Slugs in other languages
Google can read URLs in any language, written as UTF-8. Non-Latin slugs are encoded with percent signs when copied, so a Japanese or Arabic slug can look like a long string of %E3%81 in a shared link.
This generator converts accented Latin letters to plain ones (é to e, ü to u, ß to ss) and keeps only a to z and 0 to 9. That's the safe choice for English and most European sites. If your audience searches in a non-Latin script, a slug in that script is a valid choice, and you'd write it by hand.