URL Slugs: How to Write Clean, SEO-Friendly URLs

June 28, 2026 · 6 min read
Try the toolText to Slug →

The slug is the human-readable part of a URL — the how-to-bake-bread in yoursite.com/how-to-bake-bread. It is a small thing that does real work: it tells both readers and search engines what a page is about before they even click. Compare /how-to-bake-sourdough with /post?id=4827. The first communicates; the second says nothing. Here is how to write slugs that help.

What makes a good slug

A strong slug is short, descriptive, and keyword-focused. It includes the page's main keyword, drops filler words that add no meaning, uses hyphens between words, and stays as brief as it can while remaining clear. A slug like buy-running-shoes-online beats product-category-page-2 on every count — it is readable, it contains the terms people search for, and it survives being shared or read aloud. The same principles apply whether the page is a blog post, a product, a category, or documentation.

Hyphens, not underscores

Use hyphens to separate words, not underscores. This is not just aesthetic — Google has historically treated hyphens as word separators and underscores as word joiners, meaning my_page could be read as a single word "mypage" while my-page is correctly read as two words. Hyphens are the SEO-recommended standard, and they are more readable too. Spaces are never allowed in a clean URL; they get percent-encoded into %20 and make the link ugly, so they must be replaced with hyphens.

Dropping stop words

Small connecting words — the, a, an, of, to, and, in — usually add no value to a slug and can be dropped to keep it short and focused. "How to Write the Best Meta Descriptions for Your Site" can become how-to-write-meta-descriptions rather than how-to-write-the-best-meta-descriptions-for-your-site. Shorter slugs are cleaner, more readable, and put the keywords front and center. The exception is when a stop word changes the meaning or is part of a recognized phrase; then keep it.

Handling accents and special characters

Titles in many languages contain accented or non-Latin characters that do not belong in a clean URL. If you leave them in, the browser percent-encodes them into long, ugly strings — café becomes caf%C3%A9. The fix is to transliterate accents to their base letters: café becomes cafe, naïve becomes naive, piñata becomes pinata. Characters that cannot be represented get stripped. The result is a short, readable, URL-safe slug that works everywhere and survives being copied and shared.

The TextCaret Text to Slug tool converts any title into a clean, hyphenated, accent-free slug in one step — including transliterating café to cafe — so you can paste it straight into your CMS permalink field.

Slugs and your CMS

Every major platform — WordPress, Shopify, Ghost, Wix, and the static site generators — creates a slug automatically from your title. The auto-generated one is often longer than it needs to be, including every word of a long title. That is your cue to trim it to the core keywords before publishing. Most platforms let you edit the permalink field directly; a few seconds spent shortening it pays off in cleaner, more shareable, more search-friendly URLs.

One warning: don't change published slugs casually

Once a page is published and indexed, changing its slug changes its URL, which breaks every existing link to it and can lose its accumulated search ranking. If you must change a slug on a live page, set up a 301 redirect from the old URL to the new one so links and ranking transfer. The best move is to get the slug right before you publish, so you never have to change it.

Try the toolText to Slug →