SEO-Friendly URL Slugs: Best Practices for 2026
A good URL slug is short, descriptive, keyword-rich, and stable. Here's how to generate slugs that don't break when titles change.
The URL slug — that lowercase, hyphen-separated string at the end of a permalink — is one of those SEO details that's easy to overlook and painful to fix later. Once a URL is indexed and linked, changing it means setting up redirects, hoping the link equity transfers, and watching your rankings dip during the transition. Get the slug right the first time and you never have to think about it again.
What makes a slug SEO-friendly
Search engines and humans both prefer URLs that are:
- Short. Under 60 characters when possible. Long URLs get truncated in search results and are harder to share.
- Descriptive. A reader should be able to guess the page content from the URL alone.
/blog/how-to-bake-sourdough-breadbeats/blog/post-12345. - Keyword-rich. One primary keyword near the start. Not stuffed — just present.
- Stable. The slug shouldn't change when the title is edited. Use the slug as a permanent identifier.
- Lowercase. URLs are case-sensitive on most servers. Stick to lowercase to avoid duplicate content issues.
- Hyphen-separated. Hyphens are the standard word separator in URLs. Underscores are treated as part of the word by Google, not as separators.
- ASCII-only. Non-Latin scripts (Cyrillic, Arabic, Chinese) work in modern browsers via Punycode, but the resulting URL is ugly. Transliterate to ASCII when possible.
The slugification algorithm
Most slug generators do roughly the same thing:
- Lowercase the input.
- Strip leading and trailing whitespace.
- Replace non-ASCII characters with ASCII equivalents (transliteration).
- Replace any character that's not a letter, digit, or hyphen with a hyphen.
- Collapse consecutive hyphens into a single hyphen.
- Strip leading and trailing hyphens.
- Truncate to a maximum length (typically 60-80 characters).
The transliteration step is the tricky one. "Café résumé" should become "cafe-resume", not "caf-r-sum". This requires a mapping table for common non-ASCII characters — Cyrillic, Greek, accented Latin, etc.
Handling non-ASCII scripts
For Cyrillic, the standard approach is to transliterate to Latin. The Russian word "привет" becomes "privet". For Greek, "γεια" becomes "geia". For Arabic, "مرحبا" becomes "mrhba" (or "marhaba" with vowel reconstruction).
Most slug generators handle the common cases (Latin accents, Cyrillic) but fall back to dropping characters for less common scripts. If you have a multilingual site, test your slug generator with sample text from each language you support.
TextOpal's Slug Generator includes transliteration for Cyrillic, Greek, and accented Latin, with batch mode that handles hundreds of titles at once. For each title, it generates the slug, detects duplicates, and appends -2, -3, etc. to keep URLs unique.
Common mistakes
1. Including stop words. "how-to-bake-sourdough-bread" is fine, but "the-ultimate-guide-to-baking-the-perfect-sourdough-bread-at-home" is bloated. Stop words like "the", "a", "an", "to", "at" can usually be dropped without losing meaning.
2. Including dates. /blog/2026/09/15/my-post makes the URL longer and creates the impression that the content is dated. Use /blog/my-post instead, and let the publish date live in metadata or schema markup.
3. Including category prefixes. /blog/marketing/seo/my-post is verbose. Most CMSes let you drop the category from the URL and still organize content internally. Keep URLs shallow — one or two path segments max.
4. Including IDs. /blog/post-12345-my-post adds noise without value. The slug alone should be unique. If you must include an ID for routing, put it at the end and let the slug be the primary identifier.
5. Using underscores. my_post is treated as a single word by Google. my-post is two words. Always use hyphens.
6. Using query parameters for primary content. ?p=123 is opaque. Search engines treat query strings as secondary signals at best. Use clean paths.
7. Changing slugs on title edits. If you publish "10 Best Coffee Shops in Tokyo" and later rename it to "12 Best Coffee Shops in Tokyo", the slug 10-best-coffee-shops-in-tokyo no longer matches. Decide upfront: keep the original slug (and lose keyword match) or set up a redirect (and lose link equity temporarily). The clean solution: pick a slug that's title-agnostic ("best-coffee-shops-tokyo") or accept that slugs are permanent.
Batch slug generation
If you're migrating hundreds of product pages or blog posts, generating slugs one at a time is tedious. A batch slug generator takes a list of titles (one per line) and produces a list of slugs in one pass.
The challenge is duplicate detection. If you have ten products all titled "Wireless Headphones", you need ten unique slugs. Options:
- Append a counter:
wireless-headphones,wireless-headphones-2,wireless-headphones-3 - Append the SKU or category:
wireless-headphones-sony,wireless-headphones-bose - Append a short hash:
wireless-headphones-a3f2
The counter approach is the most common because it's predictable and doesn't leak internal data. TextOpal's batch mode detects duplicates and appends -2, -3, etc. automatically, with a badge flagging which slugs were de-duplicated.
SEO impact: what the data shows
Google has confirmed that URLs are a minor ranking signal. The keywords in a URL contribute a small boost to rankings for those keywords — but the impact is much smaller than title tags, headings, or content quality.
The bigger SEO benefit of good slugs is indirect:
- Click-through rate. A descriptive URL in search results encourages clicks. Users scan URLs in search results and use them as a quality signal.
- Link anchor text. When someone copies a URL as the anchor text of a link, the slug becomes the anchor. Keyword-rich slugs pass keyword relevance.
- Crawlability. Short, clean URLs are easier for crawlers to parse. Long, parameter-heavy URLs may be crawled less frequently.
The data from Ahrefs and SEMrush studies consistently shows that top-ranking pages tend to have short URLs (under 60 characters) with one or two path segments. Correlation, not causation — but the pattern is clear enough to inform slug strategy.
CMS-specific considerations
Different CMSes handle slugs differently:
- WordPress generates slugs automatically from the title. You can edit them manually. The default behavior includes transliteration for non-ASCII characters via plugins.
- Shopify uses the product title as the slug, with duplicate handling. You can edit slugs in the product editor.
- Ghost generates slugs from titles with the same algorithm as WordPress.
- Hugo / Jekyll / 11ty (static site generators) use the filename as the slug. Naming convention matters:
2026-09-15-my-post.mdbecomes/blog/my-post/. - Next.js with file-based routing uses the directory name as the slug. Plan your directory structure carefully.
For all of these, the slug is set at creation time and should rarely be changed afterward. Get it right the first time.
Stability vs. keyword match
There's a tension between slug stability (never change the URL) and keyword match (update the URL when the title changes). The standard SEO advice is to prioritize stability — once a URL is indexed and linked, changing it costs more than it gains.
If you must change a slug:
- Set up a 301 redirect from the old URL to the new one.
- Update all internal links to point to the new URL.
- Submit the new URL to Search Console for re-crawling.
- Monitor rankings for a few weeks to ensure link equity transferred.
The 301 redirect preserves most (not all) link equity. Google has confirmed that 301s pass "the vast majority" of PageRank, but some is lost in the redirect chain.
The slug you ship
The slug is the part of your URL that you control completely. It's also one of the few SEO elements that, once set, should never change. Spend the extra minute to get it right.
Generate your slugs locally with a tool that handles transliteration, duplicate detection, and batch processing. Don't ship a URL you'll regret in six months — the cost of fixing it then is ten times the cost of doing it right now.