FacebookTwitterLinkedIn

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

How to Fix “400 Bad Request. Request Header or Cookie Too Large” Error

If you’re trying to access a website and are getting the “400 Bad Request. Request Header or Cookie Too Large” error, try refreshing the page. If that doesn’t work, follow the instructions in this article, which should fix the error.

Request Header or Cookie Too Large

When accessing a website, if the website’s web server detects that the size of the cookie for that domain is too large or the cookie is corrupted, it will refuse the connection. As a result, you will see a “400 Bad Request. Request Header or Cookie Too Large” error.

What Causes the “Request Header or Cookie Too Large” Error?

  • Nginx web server. Sometimes, websites that run on the Nginx web server don’t allow large browser cookies. The Nginx web server is notorious for refusing to serve a website if it detects that the cookie for a domain stored on your browser is too large. Deleting the cookies for a specific domain or clearing all of your browser’s saved cookies will fix the issue.
  • The cookies stored in the browser were corrupted. The web server of a particular domain can also refuse to serve the website if the cookies for said domain were somehow corrupted. Again, clearing your broåwser cookies will fix the issue.
  • Before trying our fixes, here are some tips:
  • Reload the webpage. Click the Reload button next to the address bar or hold down the Ctrl+F5 keys on your keyboard to reload the page.
  • Open the webpage in a private window. Open the website in Incognito (Chrome), Private Browsing (Firefox), or InPrivate in Edge.
  • Try a different web browser. If you can’t access a website with your default browser, try a different browser to determine whether the issue streams from your browser.

Video Tutorial on How to Fix "400 Bad Request. Request Header or Cookie Too Large"

Table of Contents:

Clear Web Browser Cookies and Cache

Your browser’s cache stores website data such as texts and images to reduce the number of requests to the website server and improve load times. Your browser also stores cookies that contain session history and your preferences and settings.

However, your browser’s cache and/or cookies may become corrupt and trigger the Request Header or Cookie Too Large” error. You will also get this error if a website sends cookie data that is too large. Clearing your browser’s cookies and cache can fix the error.

Clearing your browser cookies and cache won’t affect the custom settings you’ve made to your browser.

Clear Cookies and Cache in Google Chrome

Click the three-dot menu button at the top-right corner and select Clear browsing data

1. Open Chrome. Click the three-dot menu button at the top-right corner and select Clear browsing data.

Open the Time range drop-down menu and select All time

2. Select the Advanced tab.

3. Open the Time range drop-down menu and select All time.

Ensure that the Browsing history, Download history, Cookies and other site data, and Cached images and files checkboxes are marked and click Clear data

4. Ensure that the Browsing history, Download history, Cookies and other site data, and Cached images and files checkboxes are marked.

5. Click Clear data.

[Back to Table of Contents]

Clear Cookies and Cache in Mozilla Firefox

Click the menu button at the top-right corner and select Settings

1. Open Firefox. Click the menu button at the top-right corner and select Settings.

Select the Privacy & Security panel and click Clear Data

2. Select the Privacy & Security panel.

3. Scroll down and click Clear Data.

Ensure that the Cookies and Site Data and Cached Web Content checkboxes are marked and click Clear

4. Ensure that the Cookies and Site Data and Cached Web Content checkboxes are marked and click Clear.

Click Clear now when prompted

5. Click Clear Now when prompted.

6. If clearing the cookies didn’t fix the error, close Firefox.

7. Hold down Windows+E keys to open File Explorer.

Type in %AppData%MozillaFirefoxProfiles in the address bar and press Enter

8. In the address bar, type in %AppData%\Mozilla\Firefox\Profiles and press Enter.

Access your Firefox profile folder

9. Access your profile folder.

Right-click cookies.sqlite, cookies.sqlite-shm, and cookies.sqlite-wal and click Delete

10. Locate cookies.sqlite, cookies.sqlite-shm, and cookies.sqlite-wal files.

11. Right-click each file and click Delete.

[Back to Table of Contents]

Clear Cookies and Cache in Microsoft Edge

Click the three-dot menu button at the top-right corner and select Settings

1. Open Edge. Click the three-dot menu button at the top-right corner and select Settings.

Select the Privacy, search, and services panel

2. Select the Privacy, search, and services panel.

Click Choose what to clear

3. Scroll down and click Choose what to clear.

Open the Time range drop-down menu and select All time

4. Open the Time range drop-down menu and select All time.

Ensure that the Browsing history, Download history, Cookies and other site data, and Cached images and files checkboxes are marked and click Clear now

5. Ensure that the Browsing history, Download history, Cookies and other site data, and Cached images and files checkboxes are marked.

6. Click Clear now.

Did this article help you fix the “Request Header or Cookie Too Large”? Leave a comment below to let us know. If you know how to fix this error not mentioned in this article, please share it with others in the comments.

[Back to Top]

▼ Show Discussion

About the author:

Rimvydas Iliavicius

Rimvydas is a researcher with over four years of experience in the cybersecurity industry. He attended Kaunas University of Technology and graduated with a Master's degree in Translation and Localization of Technical texts. His interests in computers and technology led him to become a versatile author in the IT industry. At PCrisk, he's responsible for writing in-depth how-to articles for Microsoft Windows. Contact Rimvydas Iliavicius.

Our guides are free. However, if you want to support us you can send us a donation.

About PCrisk

PCrisk is a cyber security portal, informing Internet users about the latest digital threats. Our content is provided by security experts and professional malware researchers. Read more about us.

Malware activity

Global malware activity level today:

Medium threat activity

Increased attack rate of infections detected within the last 24 hours.