Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the optimum limit for URL length? 100, 200+

Tags:

asp.net

I have an ASP.Net 3.5 platform and windows 2003 server with all the updates.

There is a limit with .Net that it cannot handle more than 260 characters. Moreover if you look it up on web, you will find that IE 6 fails to work if it is not patched at above 100 charcters.

I want to have the rewrite path module to be supported on maximum number of browsers, so I am looking for an acceptable limit to which I can create verbose URL's.

like image 662
sajidnizami Avatar asked Oct 07 '08 16:10

sajidnizami


People also ask

What is the optimal length of a URL?

So somewhere around 50 – 60 characters is a pretty good number to shoot for. If you go way beyond (say 80+ characters), this is likely to have a negative impact on your ranking.

How long is too long for URL?

What Does "URL Too Long" Mean? A URL is considered too long if it is longer than 100 characters.

What is the average length of a URL?

The average URL on Google's first page is 66 characters long.

What is the maximum length of a URL in Chrome?

Chrome limits URLs to a maximum length of 2MB for practical reasons and to avoid causing denial-of-service problems in inter-process communication. On most platforms, Chrome's omnibox limits URL display to 32kB ( kMaxURLDisplayChars ) although a 1kB limit is used on VR platforms.


1 Answers

A Url is path + querystring, and the linked article only talks about limiting the path. Therefore, if you're using asp.net, don't exceed a path of 260 characters. Less than 260 will always work, and asp.net has no troubles with long querystrings.

http://somewhere.com/directory/filename.aspx?id=1234
                                             ^^^^^^^- querystring
                    ^^^^^^^^^^^^^^^^^^^^^^^^ -------- path

Typically the issue is with the browser. Long ago I did tests and recall that many browsers support 4k url's, except for IE which limits it to 2083, so for all practical purposes, limit it to 2083. I don't know if IE7 and 8 have the limitation, but if you're going to broad compatibility, you need to go for the lowest common denominator.

like image 172
Robert Paulson Avatar answered Oct 11 '22 15:10

Robert Paulson