Menu

How Long Should a URL Slug Be?
📰

How Long Should a URL Slug Be?

DEV Community: html·任宏涛·2 days ago
#9N3iSnIZ
#devto2#devto#dev#slug#words
Reading 0:00
15s threshold

The short answer

Keep the slug — the part of the URL after the domain — short, lowercase, hyphenated, and carrying the words someone would use to describe the page. Three to five words is the working range for most pages. Anything longer is usually a sentence that escaped into the address bar, and anything shorter usually says nothing at all.

There is no official limit, and no ranking bonus for hitting a particular character count. The reasons to keep slugs short are practical: people can read them, remember them, paste them without breaking them, and tell what the page is about from the URL alone. A slug is a label, and labels work best when they are short.

What a slug is, precisely

For a URL like https://example.com/guides/how-long-should-a-url-slug-be , the slug is how-long-should-a-url-slug-be — everything after the last slash that identifies this one page.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.