Policy to Define URL String Maximum Length Validation at 2,000 Characters
I’ll introduce the policy of “defining URL string validation with a maximum length of 2,000 characters or less.”
I researched the maximum character count to define URL validation.
As you can see from the information below, there are variations such as:
Since there are fluctuations, I decided there’s no need to push the limits.
I define validation with roughly 2,000 characters or less.
3.2.1 General SyntaxThe HTTP protocol does not place any a priori limit on the length of a URI. Servers MUST be able to handle the URI of any resource they serve, and SHOULD be able to handle URIs of unbounded length if they provide GET-based forms that could generate such URIs. A server SHOULD return 414 (Request-URI Too Long) status if a URI is longer than the server can handle (see section 10.4.15).
Source: ハイパーテキスト転送プロトコル — HTTP/1.1
The page URL. Some web servers require this to start with the protocol (such as http) and end with a trailing slash. This value must be specified within 2,048 characters.Source: sitemaps.org - プロトコル
Maximum URL length is 2,083 characters Internet Explorer
That’s all from the Gemba about system design with URL string maximum length around 2,000 characters.