400 Bad Request Request Header or Cookie Too Large Nginx

Did you get the dreaded 400 bad request request header or cookie too large error message while browsing your favorite website?

We all use the internet every day to network with people, research, and work. Errors like the request header or cookie too large or Err_connection_refused are far too common, and we see them frequently. Isn’t it?

If you were wondering, what does 400 bad request request header or cookie too large mean? And how to fix 400 bad request request header or cookie too large Nginx? Then this is the guide that will answer all your questions and satisfy your curiosity.

So, without further ado, let’s dive right in and see how to fix 400 bad request request header or cookie too large Nginx error on chrome.

What Does 400 Bad Request Request Header or Cookie Too Large Mean?

400 bad request is a generic error message that the server gives when it determines that no other error code fits the issue. It can be caused on any website and in any browser. The error is related to the submitted request and occurs even before the request is processed by the server.

The 400 bad request error is generally linked with the size of the cookie or if the cookie is corrupted. In such cases, the webserver refuses to serve your request as it assumes your attempt is malicious. This error usually occurs on web servers based on the Nginx platform.

In short, the error means that something is either misconfigured or the request isn’t appropriate; hence the server is unable to respond correctly. This error can be quickly fixed as it usually occurs due to misconfigurations in the browser itself.

What Causes a 400 Bad Request Request Header or Cookie Too Large Error?

There are no definite causes as the 400 bad request error code is a generic error code. This means that there can be an infinite number of root causes for this error.

In most general cases, the causes can be due to the:

  • Misconfigured settings
  • Corrupted cookies
  • A problem with the processing server

Now that we understand what 400 bad request request header or cookie too large error means and what are some probable causes, let’s take a look at how we can fix it.

How to Fix 400 Bad Request Request Header or Cookie Too Large Nginx Error

There are a few different ways to fix 400 bad request error messages depending on the browser you use.

Fix 400 Bad Request Error in Chrome

Clearing cookies and cache have proven useful in solving the 400 bad request error on chrome. To clear cookies and cache –

  • Open Google chrome
  • Click on the 3 vertical dots on the top right and select Settings from the menu
  • A new settings tab will open, click on Privacy and Security from the left hand side
  • Look for Site Settings and click on it
  • Click on Cookies and site data
  • Now click on See all cookies and site data
  • A list will appear. Look for the website that gives you the error
  • Once found, click on the dustbin icon beside it to remove all cookies and site data.
  • Reboot the chrome browser and check if the issue is resolved.

Alternative option:

  • Open chrome
  • Press control + H
  • Click on Clear browsing data
  • A window will pop up, ensure cookies and other site data is selected, and others are not checked
  • Time range should be set to All Time
  • Press the blue clear data button

This is how you can fix 400 bad request request header or cookie too large errors on chrome.

Fix 400 Bad Request Error in Firefox

Fixing the error in firefox is a bit more complicated than on chrome. To fix the 400 bad request error on firefox –

  • Open firefox
  • Click on the hamburger menu from the top right
  • Select options from the dropdown menu
  • Click on Privacy and Security from the left menu
  • Look for Cookies and Site Data and then click on the Manage data button
  • A list of all sites will open, look for the site that’s giving you errors
  • Click on it then click on remove selected and once that’s done click on save changes
  • A popup may appear. Confirm you wish to delete the site data

That’s it. Now just quit firefox and restart it and visit the website you wish to visit to check if everything is working fine.

Fix 400 Bad Request Error in Microsoft Edge

Edge recently got updated and is now based on chromium. On the older version, you were not allowed to clear the cookie for just a single site, but on the newer version, you can do it. I’ll explain both the methods to help you fix 400 bad request error.

For Old Microsoft Edge –

  • Open Edge
  • Click on the hamburger menu on the top
  • Click on History
  • Select all and clear the history
  • The error should be fixed.

For new Chromium Edge –

  • Open Edge
  • Click on the 3 horizontal dots on the top right and select Settings from the dropdown menu
  • Click on Privacy and Security
  • Scroll down till you find Clear browsing data and then click on Choose what to clear button
  • Make sure time range is set to All time
  • Select Cookies and other site data and make sure other items are unchecked
  • Click on clear now
  • All the cookies will be cleared.

Now exit the router and restart it. Visit the website that was spitting out errors and check if the 400 bad request error message disappears.

Fix 400 Bad Request Error in Internet Explorer

If you are someone who’s still using internet explorer. First, I am sorry that you are stuck in 1990, and second why? Just why?

Anyway, I will help you fix request header or cookie too large regardless of your choice of browsers, which, in this case is entirely wrong.

  • Open internet explorer
  • Click on the gear icon (settings) from the top right and select Internet options from the dropdown menu
  • A new window will open, go to the section that says general
  • You will find browsing history there click it then click on Settings and then on view files
  • A new folder will open, all the cookies are saved in this folder
  • Search for the name of the site that’s giving you issues and once you find it click on it once then press Shift + Delete to get rid of it

Close the browser and reopen it then navigate to the site where you were getting 400 bad request error. The website should start working fine.

Conclusion – 400 Bad Request Request Header or Cookie Too Large Nginx

I hope that by now I have answered your question: What does 400 bad request request header or cookie too large mean? And the 400 bad request request header or cookie too large error message that you were getting while visiting your favorite site is gone.

If you have any more questions or want us to help you with something else, please feel free to let us know in the comments below. If you are bored and just want to chat with other tech-heads, you’re welcome to drop a comment or contact us to have a conversation.