How long can a WordPress slug be?
A WordPress slug can hold up to 200 characters, because that is the size of the database column it is stored in; longer slugs are cut to fit. That is a storage limit, not a target. For search and for readers, three to five descriptive words is plenty.
Where the 200 comes from
Slugs are stored in the post_name column of the posts table, defined as varchar(200). Core respects that width in two places:
- When it turns a title into a slug, any non-ASCII characters are percent-encoded and the result is capped at 200 characters, without splitting an encoded character in half.
- When it has to add a numeric suffix to make a slug unique, it shortens the slug first so that
-2,-3and so on still fit inside 200.
Term slugs (categories, tags) use a column of the same width.
Post titles have no comparable limit. The title column is a text field, so a 300-character headline is stored in full, and the slug generated from it is whatever fits.
You are unlikely to hit 200 with English titles: it is roughly 30 words. The limit bites in other scripts.
Why non-Latin titles run out sooner
WordPress stores slugs with non-Latin characters in percent-encoded form. One Cyrillic or Greek letter becomes six characters (%d0%bf), and one Chinese, Japanese or Korean character becomes nine (%e6%97%a5). The 200 is counted after encoding.
| Script | Stored characters per letter | Letters that fit |
|---|---|---|
| English, and accented Latin after conversion | 1 | about 200 |
| Cyrillic, Greek, Hebrew, Arabic | 6 | about 33 |
| Chinese, Japanese, Korean | 9 | about 22 |
So a Russian headline of average length can be cut off mid-phrase in the URL. If you publish in these scripts, write the slug yourself and keep it to a few words, or use a transliterated Latin slug if that suits your audience. There is more on the trade-offs in non-English characters in slugs.
What length is good for SEO?
Google has not published a URL length that affects ranking, and its URL guidance is about clarity: readable words, hyphens between them, no needless parameters. Very long URLs work.
Short slugs win on everything that involves a person:
- In results. Google usually shows a breadcrumb-style path rather than the full URL, and long paths are shortened with an ellipsis.
- In sharing. A long address wraps across lines in email and chat, and some apps cut it.
- In maintenance. A slug that restates the whole headline goes out of date when the headline is edited. A short topical slug does not.
A workable rule: name the topic in three to five words, most distinctive first. /espresso-grind-size/ rather than /how-fine-should-you-grind-coffee-beans-for-espresso-at-home/.
Remember the slug is only part of the address. The domain, any /blog/ prefix, date folders and category in the permalink structure all add length before the slug begins, so sites with long structures have more reason to keep slugs tight.
Checking and fixing slug length
For new content, edit the slug in the editor sidebar before you publish. The URL slug generator will produce a trimmed version from a headline and shows its length.
For published content, a long slug is not a fault to repair. Shortening it means a URL change, a redirect and a period where search engines hold both addresses. Do it only when the slug is truncated into nonsense, contains a mistake, or is so long that it gets mangled when shared.
To find truncated slugs on a site with non-Latin content, sort posts by slug length in a database tool or export, and look at those at or near 200 characters. Those are the ones that were cut, and the cut may have landed mid-word. Rewrite each to a short deliberate slug and let the old one redirect.
One related quirk: when a post is moved to Trash and another post later needs the same slug, core renames the trashed one with a __trashed suffix, shortening the slug to 191 characters first so the suffix fits.
Common questions
Is there a maximum URL length for Google?
Google has not documented a length that affects ranking. Sitemaps cap each URL at 2,048 characters, which is far beyond anything a slug will produce.
Does WordPress warn me when a slug is truncated?
No. The slug is shortened silently when it is generated, so check the address of posts with very long or non-Latin titles after publishing.
Do category and tag slugs have the same limit?
Yes. The slug column in the terms table is also 200 characters wide.