SEO-Friendly URLs: How to Write Slugs That Rank (And Don't Break)
A URL is the most permanent thing on a webpage. You can rewrite a title tag in five minutes. Changing a URL means redirects, lost backlinks, broken bookmarks, and crawl-budget waste while Google figures out what happened. So it's worth getting the slug right the first time.
The good news: there are maybe eight rules. Once you've internalized them, every new page slugs itself.
What Counts as the "Slug"
The slug is the readable part of a URL after the domain and any subfolder. In https://example.com/blog/url-slug-best-practices, the slug is url-slug-best-practices. Everything Google reads about URL structure flows from this — folder depth, keywords, separators, length.
Slugs are the only piece of the URL most CMS platforms let you control without code. WordPress calls it the "permalink." Webflow calls it the "URL field." Next.js, Astro, and most static-site generators derive it from your file or folder name. Whatever the tool, the choice you make at publish time is locked in unless you set up a 301 later.
The Rules That Matter
1. Use hyphens, never underscores
Google has officially stated since 2005 that hyphens are word separators and underscores are not. seo-friendly-urls reads as three words; seo_friendly_urls reads as one giant token Google can't parse. Spaces become %20 (ugly and treated as a word break, but visually broken). Periods, slashes, and camelCase all create their own problems.
Hyphens. Always.
2. Lowercase everything
/Best-Plumbers and /best-plumbers are technically two different URLs to most servers. If both resolve, you've got duplicate content. If only one does, links to the other 404. Force lowercase at the slug level, then add a server rule that redirects mixed-case requests to the lowercase version.
3. Keep it short — but not so short it loses meaning
Aim for 3-5 words, roughly 50-60 characters. Google has confirmed it doesn't penalize long URLs, but click-through rate drops as URLs get longer because they get truncated in search results. A Backlinko study of 11.8 million SERPs found short URLs ranked higher on average than long ones — likely a correlation with focused, well-edited pages rather than length itself.
Cut filler words: the, a, to, for, of, and. Keep the words that carry the keyword. how-to-write-a-meta-tag-for-seo becomes how-to-write-meta-tags.
4. Strip accents and special characters
Accented characters (é, ñ, ü) get URL-encoded to ugly percent strings (%C3%A9) when copied or shared. Most of the time they survive in the address bar but break when pasted into Slack, email, or a third-party CRM. Convert them to ASCII equivalents (café → cafe, año → ano) at the slug level.
The same goes for punctuation. Commas, apostrophes, ampersands, question marks, and exclamation points all create either encoding issues or routing collisions. Strip them entirely or replace with hyphens. A URL Slug Generator handles this automatically — paste any title and it returns a clean ASCII slug.
5. Match the slug to the page's primary keyword
The URL is a small ranking signal, but more importantly it's a strong relevance signal to users scanning search results. A slug that includes the query the user typed gets bolded in the SERP. That bolding alone can lift CTR a few percent.
If you're publishing "How to Set Up a Mailchimp Welcome Series," the slug should be mailchimp-welcome-series-setup — not post-247 or 2026/05/article-about-email.
Don't keyword-stuff. mailchimp-email-mailchimp-welcome-mailchimp-series looks like exactly what it is. One clean keyword phrase.
6. Don't put dates in the slug
/blog/2026/05/04/seo-tips looks tidy in the file system, but the moment you update the post next year you've got a URL that says 2026 forever. Either you change it (and lose all the backlinks) or you live with looking outdated.
Date-based URLs also signal "old content" to users. A 2021 post in the URL gets fewer clicks than the same post under a clean keyword slug, even if the content is identically up to date. Use /blog/seo-tips instead.
7. Mirror your site structure — flatly
If you have a clear category hierarchy, reflect it: /tools/url-slug-generator is fine. /site/category/subcategory/sub-subcategory/article-name is not. Each extra folder adds a click of perceived depth and dilutes internal link equity.
A useful rule of thumb: every important page should be reachable in 3 clicks from the homepage. If your URL has more than 2 slashes after the domain, you're probably nesting too deep. Flatten.
8. Decide once on trailing slashes
Pick /about-us or /about-us/ and stick with it across the entire site. Inconsistency creates duplicate-content issues — Google sees /about and /about/ as different URLs unless you 301 one to the other or set a canonical tag. Most modern frameworks default to no trailing slash; pick whichever your stack prefers and enforce it server-side.
Common Mistakes That Bleed Traffic
Auto-generated IDs in the URL. WordPress's ?p=247 or Shopify's /products/123456789 have zero ranking value. Switch to a slug-based permalink structure on day one. Migrating later means hundreds of 301 redirects.
Punctuation from the title bleeding in. A post titled "What's the Deal With Schema?" should not become whats-the-deal-with-schema? — the question mark breaks routing and gets stripped by some link parsers. Strip it: whats-the-deal-with-schema.
Stop-word overload. "The 10 Best Ways to Write a Title Tag for SEO" becomes a slug with 8 of 12 words being filler. best-ways-to-write-title-tags is shorter, clearer, and ranks better.
Slug changes without 301s. Every time you change a URL without setting up a redirect, you lose every backlink pointing at the old URL. Use a Redirect Chain Checker after any URL migration to catch broken hops.
Translation of slugs across languages. If you run a multilingual site, slugs should be translated, not transliterated. Spanish users searching "carta de bienvenida" won't click /welcome-letter — even if the page content is in Spanish. Slug it as /carta-de-bienvenida. Pair this with proper hreflang tags so Google serves the right version.
What to Do With URLs You Already Have
If you're inheriting a site full of bad URLs, you have three options:
- Leave them. Existing pages with backlinks and ranking history are usually better left alone. The SEO penalty for bad URLs is small; the cost of a botched redirect migration is large.
- Fix only the worst. Pages with
?p=247-style URLs, dates, or random IDs are worth migrating. Pages that just have a few stop words probably aren't. - Rebuild on a fresh path. If you're doing a full site replatform anyway, take the chance to re-slug everything — but maintain a 301 from every old URL to its new one. Test the entire map with a crawler before going live.
A Quick Checklist Before You Publish
- All lowercase, hyphens only, no underscores
- 3-5 keyword-rich words, under 60 characters
- No dates, no IDs, no punctuation
- Accents stripped to ASCII
- Mirrors a flat category structure (max 2 folders deep)
- Trailing-slash convention matches the rest of the site
- Slug includes the page's primary keyword once
Run a few titles through the URL Slug Generator to see the rules in action. Once the patterns are muscle memory, slugging becomes a 5-second decision instead of a debate.
The whole reason any of this matters is that a URL is a promise. A user clicks because the URL told them what they were going to get. A clean, readable slug delivers that promise before the page even loads — and that's worth more than any single ranking signal.
Ready to try it?
Convert any title or phrase into a clean, SEO-friendly URL slug. Handles accents, special characters, stop words, and length limits. Batch mode for hundreds of slugs at once.
🔗 URL Slug Generator — Free Online ToolGet notified about new SEO tools
More free tools coming soon — keyword research, sitemap generator, and more.