Skip to content

How to Write URL Slugs: Rules, Examples and Redirects

What a good slug looks like

The slug is the part of a URL that names one page. In https://writepadpro.com/blog/how-to-write-url-slugs, the slug is how-to-write-url-slugs. A good slug is short, lowercase, made of real words separated by hyphens, describes the page, and never changes after the page is published.

This guide covers what Google's own documentation says about URLs, practical rules for writing slugs, a before-and-after table generated with the URL Slug Generator, how accents and non-Latin scripts are handled, and what to do if you must change a slug that is already live.

What Google's documentation says

Google Search Central publishes URL structure best practices (page last updated 2025-12-10; we checked it on 2026-10-14). The points that matter for slugs:

  • Readable words over IDs. Google recommends readable words rather than long ID numbers when possible. /blog/how-to-write-url-slugs tells a reader and a search engine more than /blog/?p=4721.
  • Hyphens, not underscores. The guide recommends hyphens (-) to separate words and says it does not recommend underscores (_).
  • Case matters. Google says its URL handling is case sensitive, so /Blog/My-Post and /blog/my-post are different URLs to it. Pick one case; lowercase is the easy choice. WritePadPro itself redirects any URL path with capital letters to its lowercase version for this reason.
  • Non-ASCII characters. Characters outside the ASCII range should be percent-encoded in links. Browsers and most content management systems do this for you.
  • Simple structure, few parameters. Google asks for a simple, logical URL structure and as few parameters as possible.

Note what the guide does not do: it does not set a maximum length or a number of words. The length advice below is our own editorial recommendation, not a Google rule.

Eight rules for writing slugs

  1. Describe the topic in three to six words. Start from the main phrase someone would use to find the page, not from the full headline.
  2. Use lowercase letters, digits and hyphens only. No spaces, no underscores, no punctuation, no emoji.
  3. Drop words that add nothing, such as "the", "a" or "of", but keep small words that carry meaning. "how-to" reads better than "how" alone.
  4. Leave out details that will change. A year, a count ("10 tips") or a version number in the slug ages badly when you update the article. Keep them in the title instead.
  5. Keep the brand out. Your domain already names the site.
  6. Do not stuff keywords. One clear phrase beats a string of near-synonyms.
  7. Make every slug unique within its folder, and be consistent across the site: same separator, same case.
  8. Decide once. Treat a published slug as permanent. Changing it later means a redirect (see the last section).

Slug patterns by page type

The same rules apply everywhere, but each kind of page has its own typical mistake. These are our recommendations:

Page typeAvoidPreferWhy
Blog article/blog/2026/11/the-ultimate-guide-to-writing-better-url-slugs-in-2026/blog/how-to-write-url-slugsDates in the path and in the slug make an evergreen article look old.
Product/product?id=88213&color=blue/shop/merino-wool-socksReadable words instead of an ID; variants such as color can stay as options on the page.
Category/category/cat-12/shop/socksA category slug is often reused in every product URL below it, so keep it to one or two words.
Landing page/lp/spring-promo-v3-final/spring-saleInternal version labels leak into a public address that people share.
Translated page/de/how-to-write-url-slugsa slug in the page's own languageReaders of the German page should recognize the words in its URL.

Before and after: real titles, real slugs

The middle columns come straight from the URL Slug Generator; the last column is the slug we would publish, usually obtained by trimming the title before generating it.

TitleDefault slugWith an optionSlug to publish
How to Write URL Slugs: 9 Rules (With Examples)how-to-write-url-slugs-9-rules-with-examplesRemove stop words: how-write-url-slugs-9-rules-exampleshow-to-write-url-slugs
The 10 Best Coffee Shops in São Paulo for 2026the-10-best-coffee-shops-in-sao-paulo-for-2026Remove stop words and numbers: best-coffee-shops-sao-paulobest-coffee-shops-sao-paulo
Q&A: Why 90% of Résumés Failq-and-a-why-90-percent-of-resumes-failSymbols not spelled out: q-a-why-90-of-resumes-failwhy-resumes-fail
O’Brien’s Guide to C++ & C#obriens-guide-to-c-plus-plus-and-c(the # is dropped, so C# became "c")obriens-guide-to-cpp-and-csharp
Müller & Söhne: Straße der Einheitmuller-and-sohne-strasse-der-einheitGerman rules: mueller-and-soehne-strasse-der-einheitGerman rules, for a German audience
Best Running Shoes for Flat Feet in 2026 — Tested and Reviewed by Our Team72 charactersMaximum length 50: best-running-shoes-for-flat-feet-in-2026-testedbest-running-shoes-flat-feet
🔥 Hot Deals 🔥hot-deals—hot-deals

Two lessons from the table. First, a tool can clean characters but cannot judge meaning: "C#" losing its "#" is correct slug behavior and still the wrong result, so read every slug before publishing. Second, the maximum length option cuts at a word boundary, which avoids half-words, but a cut-off slug that ends in "tested" is rarely the best slug; shortening the title gives a better one.

How the generator builds a slug

Knowing the exact steps helps you predict the output:

  1. Clean up. HTML entities are decoded (& becomes &), and invisible zero-width characters and soft hyphens are removed.
  2. Spell out symbols (on by default): & becomes "and", % "percent", + "plus" and @ "at".
  3. Join contractions. Apostrophes inside words disappear instead of splitting them: "Don’t Stop Believin’" becomes dont-stop-believin, not don-t-stop.
  4. Lowercase (on by default).
  5. Transliterate (on by default): accents are removed (é → e, ñ → n, every Vietnamese tone mark), letters without an unaccented form are spelled out (ß → ss, æ → ae, ø → o, ł → l, þ → th), and Cyrillic and Greek are converted to Latin letters.
  6. Split into words. Only letters and digits survive; every run of punctuation, spaces, symbols or emoji becomes one separator. That is why a messy title such as "Lots of spaces --- and dashes__" becomes lots-of-spaces-and-dashes, with no doubled hyphens and no trailing separator.
  7. Optional filters. Remove stop words, remove stand-alone numbers, or drop non-Latin words.
  8. Join and trim. Words are joined with a hyphen (or an underscore if you choose it), and an optional maximum length trims at the last whole word that fits.

The stop-word filter uses a short list of 28 English words: a, an, the, and, or, but, nor, of, in, on, at, to, for, from, by, with, as, into, onto, upon, is, are, was, were, be, been, being and am. It never removes every word: "Of and To" stays of-and-to. It can still surprise you, though. "To Be or Not to Be" with stop words removed becomes not, which is why the option is off by default.

For a whole list of titles, put one per line. Each line gets its own slug, a table shows the length of each, and "Make duplicates unique" adds -2, -3 and so on: "Contact Us", "Contact us" and "Contact US!" become contact-us, contact-us-2 and contact-us-3. You can copy the slugs, download them as a text file, or download a CSV with each title next to its slug for a CMS import. The status line warns when a slug is longer than 75 characters.

Accents, other alphabets and non-Latin slugs

Transliteration rules differ by language, and the generator lets you pick:

  • Standard removes accents: "Smørrebrød på Ærø" becomes smorrebrod-pa-aero.
  • Danish / Norwegian spells the letters out: smoerrebroed-paa-aeroe.
  • German gives ä → ae, ö → oe and ü → ue, as in the Müller example above.
  • Serbian / Croatian gives đ → dj: "Sergej Đoković" becomes sergej-djokovic instead of sergej-dokovic.
  • Ukrainian follows the national system: "Київ і Харків" becomes kyiv-i-kharkiv, where the Russian-style default gives kiyiv-i-kharkiv.
  • Bulgarian follows the Streamlined System.

Greek is transliterated too ("Αθήνα" becomes athina). Scripts without a transliteration table, such as Chinese, Japanese, Arabic or Hindi, are kept as they are while "Keep non-Latin letters" is ticked. A Japanese title such as 東京の天気 stays a five-character slug, and the preview shows that browsers send it percent-encoded as 45 characters (%E6%9D%B1%E4%BA%AC%E3%81%AE%E5%A4%A9%E6%B0%97). Untick the option and only Latin letters and digits remain, so that title produces an empty slug and the tool tells you so.

Which should you use? For a site written in that language, a slug in the same script is readable for your audience and is supported by modern browsers. For a mostly English site, a transliterated or translated slug is easier to type and share. To see how any URL is encoded, use the URL Encoder and our URL encoding guide.

Slugs, titles and meta descriptions work together

The slug is one of three short texts a searcher sees for your page, next to the title and the description. Write the title first, derive the slug from its core phrase, then write a description that delivers what the title promises. The Meta Tag Generator helps with the last two, and our meta tags guide explains the details. For a full pre-publish routine, see the 15-point blog SEO checklist.

Changing a slug that is already published

Every link, bookmark and search result points at the old address. Change it only for a real reason, such as a slug that is wrong, misleading or contains an error, and never just to squeeze in a keyword.

If you do change it, redirect the old URL. Google's documentation on redirects and Google Search (last updated 2026-04-14; checked 2026-10-14) explains the difference: a permanent redirect (HTTP 301 or 308) is used as a signal that the target should be the canonical URL, while temporary redirects (302, 303, 307) are not. Google recommends a permanent server-side redirect whenever possible, and only when you are sure it will not be reverted.

A clean slug change, step by step:

  1. Pick the new slug and publish the page under it.
  2. Add a permanent server-side redirect from the old path to the new one.
  3. Update your own internal links, menus and sitemap so they point at the new URL directly instead of through the redirect.
  4. If the page moves again later, point the oldest URL straight at the newest one rather than building a chain of redirects.
  5. Check the result: curl -I https://example.com/blog/old-slug should answer with a 301 status and a Location header naming the new URL.

Two common ways to write the redirect:

# Apache (.htaccess, mod_alias)
Redirect 301 /blog/old-slug /blog/new-slug

# Nginx (inside the server block)
location = /blog/old-slug { return 301 /blog/new-slug; }

Your hosting panel or CMS may offer a redirect screen that does the same thing without editing files. Whatever you use, keep the redirect in place for as long as the old address might still be linked from somewhere.

Slug checklist

  • Three to six words that name the topic.
  • Lowercase, hyphens between words, no punctuation or emoji.
  • No year, count or version that will change.
  • Read it once: did a symbol such as # or + vanish and change the meaning?
  • Unique within its folder.
  • Never changed after publishing without a 301 redirect.

Paste your next title into the URL Slug Generator, compare the default with the stop-word and length options, and keep the shortest slug that still says what the page is about.

Frequently Asked Questions

Should I use hyphens or underscores in a URL slug?

Hyphens. Google’s URL structure guidance recommends hyphens to separate words and does not recommend underscores. The URL Slug Generator uses hyphens by default and offers underscores only for systems that require them.

How long should a URL slug be?

Google’s URL guidance does not set a length limit; it asks for a simple, readable structure. As an editorial rule we aim for three to six meaningful words. The URL Slug Generator warns above 75 characters and can trim a slug to a maximum length at a word boundary.

Should I remove stop words like the, a and of from slugs?

Often, but not blindly. Removing them shortens slugs, yet some small words carry meaning, as in how-to. The generator’s stop-word option removes 28 common English words and never removes every word, but check the result: To Be or Not to Be becomes just not.

Can a slug contain accented letters or another script?

Yes. Modern browsers support non-Latin URLs and send the characters percent-encoded behind the scenes. With transliteration on, the generator removes accents and converts Cyrillic and Greek to Latin letters; scripts such as Chinese or Japanese are kept while Keep non-Latin letters is ticked.

What happens if I change the slug of a published page?

The old URL stops working unless you redirect it. Add a permanent server-side redirect (301 or 308) from the old path to the new one, update your internal links and sitemap, and check the redirect with curl -I. Google treats a permanent redirect as a signal that the new URL should be canonical.

Should a slug include the year or a number such as 10 tips?

Usually not. Years, counts and version numbers change when you update an article, and the slug should stay the same forever. Keep those details in the title, where you can update them without breaking links.

Try These Tools

Related Articles