Alex Rivera | Logout

What is the ideal length of an URL slug

Asked 2010-05-27T12:25:10.370
23

To make pretty URL's from article titles I am using a simple function. However lately I an concerned about the ideal length of these "slugs". It is said that too many dashes are bad.

However some article titles can be long and a too long URL may not be liked by google. Of course that defeats th whole idea of having URL slugs.

So does anyone have any idea how long a URL slug should be. Should there be a limit on the "dash" charecters used?

Edit
Report

2 Answers

32

If you really want to be economic with URL space, I'd remove articles (the, a, an etc.) more aggressively than prepositions and verbs since removed articles don't change the semantics of the sentence that much.

e.g.

What is the ideal length of an URL slug

remove articles

What is ideal length of URL slug

remove "What is"

ideal length of URL slug

normalization

ideal-length-of-url-slug
answered 2010-05-30T15:19:47.037
2

I don't think there a limit on the number of dash characters used will make a difference. You should keep the whole string limited to around 80-100 characters max.

Like back2dos said you can remove some common words but ideally, the slug should make sense as a page title. With this page for example, removing all the common words gives you ideal-length-url-slug which kinda works. But I'd say ideal-length-of-url-slug is better.

answered 2010-05-29T12:47:41.413

Your Answer