How to Create SEO-Friendly URL Slugs
By Akmal Ali · Published · Updated · 4 min read
Use a few lowercase words that describe the page, separated by hyphens, with punctuation, symbols and filler removed: “How to Compress an Image to 50KB (Free!)” becomes compress-image-to-50kb. Avoid dates and numbers that will change. If you change a published slug, redirect the old URL to the new one.
Before anyone reads your page, they may see its address: in a search result, a shared link or a browser tab. A clean slug tells them what the page is about at a glance; a messy one looks like a tracking link. Good slugs are easy to write once you know the handful of rules below.
What is a URL slug?
The slug is the last, readable part of a URL that identifies a page. In www.vektratool.com/blog/what-is-a-uuid, the slug is what-is-a-uuid. Most content systems create one from the page title, and let you edit it before publishing.
The rules of a clean slug
Use lowercase
On many web servers, paths are case-sensitive, so /Blog/My-Post and /blog/my-post can be two different pages, or one of them a 404. Lowercase avoids the question entirely and is easier to type.
Separate words with hyphens
Spaces aren’t allowed in URLs; a browser turns them into %20, which is hard to read. Use hyphens instead. Google’s URL guidelines recommend hyphens rather than underscores, because hyphens are read as word separators.
Remove punctuation and symbols
Characters such as ?, # and & have special meanings in a URL: they start the query string, a fragment or a new parameter. Apostrophes, brackets, emoji and exclamation marks add nothing and often end up percent-encoded. Leave them out.
Handle accents and other scripts deliberately
Accented Latin letters can be simplified: “café” becomes cafe and “Größe” becomes grosse. Titles in Arabic, Urdu, Chinese or other scripts can stay in their own script, which Google supports, but they are percent-encoded when copied: café kept as is would be caf%C3%A9 in a pasted link, as the URL encoder shows. If your site targets one language, keep its script; if links are mostly shared in plain text, an ASCII slug is more robust.
Describe the page, briefly
A slug should say what the page is about, using the words people would use. There’s no fixed maximum length, but three to six meaningful words is usually enough. A slug alone won’t make a page rank, but a clear one helps people decide to click, and understand a link when it’s shared on its own.
Good and poor slugs
| Page title | Poor slug | Better slug |
|---|---|---|
| How to Compress an Image to 50KB (Free!) | How_To_Compress_An_Image_To_50KB_(Free!) | compress-image-to-50kb |
| 10 Tips & Tricks for Café Owners | 10-tips-%26-tricks-for-caf%C3%A9-owners | tips-for-cafe-owners |
| What’s New in 2026? Our Top 5 Picks 🎉 | post?id=4821 | top-picks |
| The Best Guide to the History of the Internet | the-best-guide-to-the-history-of-the-internet-ever-written | history-of-the-internet |
The better slugs drop words that don’t help: numbers that will change (“10 tips” becomes wrong when you add an eleventh), years on pages you plan to update, and filler such as “the best”. Short words like “to”, “of” and “the” are optional; keep them when the slug reads badly without them.
How to create a slug
- Paste the page title into the slug generator. Put one title per line to make several.
- Choose hyphens, and options such as ASCII only, removing short words, or a maximum length that cuts at a word boundary.
- Edit the result down to the words that matter, then copy it into your page’s URL field.
For example, “The Best Guide to the History of the Internet” becomes the-best-guide-to-the-history-of-the-internet, or best-guide-history-internet with short words removed. From there, trimming to history-of-the-internet is a quick edit.
Slug Generator
Turn titles into lowercase, hyphenated slugs with accents simplified and punctuation removed, one per line.
Should you change a slug later?
Once a page is published and linked, its URL is part of the web. If you must change the slug, set up a permanent (301) redirect from the old URL to the new one, update your own internal links and sitemap, and make sure the page’s canonical URL uses the new address. Without a redirect, bookmarks and links from other sites break.
Common mistakes
- Keyword stuffing, such as
cheap-shoes-buy-shoes-best-shoes. It reads as spam to people and search engines alike. - Mixing cases or separators across a site, so links are hard to guess or type.
- Mixing trailing slashes, so
/pageand/page/both exist. Pick one form and redirect the other. - Changing slugs without redirects, which turns working links into 404 pages.
For what happens to characters that do end up in a URL, see how URL encoding works.
Frequently Asked Questions
Should product codes go in a slug?
Include a code only if people search for it, and put it after the descriptive words, as in blue-wool-scarf-sk1043. Leave out internal codes that customers never see.
Do slugs have to be unique?
Within the same folder, yes, because two pages can’t share an address. The same slug can appear in different sections, such as /blog/pricing and /help/pricing, but people confuse them, so make them distinct where you can.
Should the slug change when I edit the title?
Usually not. A small change to the title doesn’t justify breaking links to the page. Change the slug only when it no longer describes the page, and then redirect the old address.