Answer the question
In order to leave comments, you need to log in
Can clicking on a link from a search result in a 413 error?
Hello.
SEO specialists write to the client that sometimes when you click on a link from a search engine to a site, instead of the expected page, the server gives a 413 error. The logs are empty. Is it possible? Or is it locally with SEOs (in the search I found information about the frequent appearance of this error when using some routers with a buggy firmware)?
Server linux, nginx, body size 50m. But in fact, how can the request body be "too big" when following a link from a search engine?? 413 error is after all the transfer of information to the server (for example, a file upload).
Answer the question
In order to leave comments, you need to log in
In general, the situation was as follows - nginx had a buffer for headers from the client set to 2kb, and from time to time clients who had more than 2kb in cookies went to the site (according to global practice and it seems like the standard can be up to 4kb) from here and I got 413 error.
In the nginx.conf file, in the http section, add/change:
client_max_body_size 100m;
Syntax: client_max_body_size size;
Default: client_max_body_size 1m;
Context: http, server, location
Sets the maximum allowed size of the client request body, specified in the “Content-Length” field of the request header. If the size is larger than the specified one, then the client returns error 413 (Request Entity Too Large). Keep in mind that browsers do not know how to display this error correctly. Setting size to 0 disables client request body size checking.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question