What is a safe maximum length a segment in a URL path should be?

Possibly related of What is the maximum length of a URL in different browsers?

In short

According to the HTTP spec, there is no limit to a URL’s length. Keep your URLs under 2048 characters; this will ensure the URLs work in all clients & server configurations. Also, search engines like URLs to remain under approximately 2000 characters.

Chrome has a 2MB limit for URLs, IE8 and 9 have a 2084 character limit. So everything points in keeping your URLs limited to approx. 2000 characters.

Also, from a usability point-of-view, URLs that long are not usable/readable by users.

However, the domain name has a max. length of 255 characters.
So to be on the safe side, the max. length of an URL segment would be around 1745 characters, given that your URL exists out of 1 segment.

Leave a Comment