Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the ideal length of an URL slug

Tags:

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?

like image 998
Sinan Avatar asked May 27 '10 12:05

Sinan


1 Answers

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 
like image 59
Timo Westkämper Avatar answered Oct 22 '22 22:10

Timo Westkämper