In this guide, we break down exactly what HTTP Error 431 is, what’s causing it in your specific situation, and how to fix it in 3 structured steps, whether you’re a visitor trying to access a site or a website owner whose visitors are reporting this error.
What Exactly Is HTTP Error 431?
Every time you visit a website, your browser sends an HTTP request to the server. That request includes a set of HTTP headers, small blocks of metadata that travel alongside the actual page request.
Think of HTTP headers like the information written on the outside of an envelope before you send a letter. The envelope contains things like:
- Who you are (User-Agent: Chrome on Windows)
- Where you came from (Referer: google.com/search?q=…)
- What cookies you’re carrying (Cookie: session_id=abc123; user_pref=…)
- What languages do you prefer (Accept-Language: en-US)
- What content types do you accept (Accept: text/html)
All of this metadata gets sent with every single request. Under normal circumstances, this is fast and invisible. But when these headers get too large, either because one header is massive or because many small headers have stacked up, the server hits its size limit and refuses to process the request.
That refusal is HTTP Error 431.
Is 431 a Client Error or Server Error?
HTTP 431 is officially classified as a 4xx client-side error. This means the browser (your side) is sending a request that the server can’t accept, because the headers it’s sending are too large.
However, this doesn’t always mean you did something wrong. Sometimes the website itself is generating the oversized headers (through excessive cookies or bloated tracking scripts), meaning the root cause is actually on the server side, even though the 431 code technically blames the client.
How Does HTTP Error 431 Look in Different Browsers?
| Browser | What You’ll See |
|---|---|
| Google Chrome | Blank white page or ‘This page isn’t working’ + HTTP ERROR 431 |
| Mozilla Firefox | Generic ‘Bad Request’ page (often no error code shown) |
| Microsoft Edge | White error page: HTTP ERROR 431 / Request Header Fields Too Large |
| Safari | Blank page or ‘Safari can’t open the page’ error |
| Opera | Request Header Fields Too Large, Error 431 |
What Causes HTTP Error 431? (7 Root Causes Explained)
Before jumping to fixes, it’s important to understand which of these causes applies to your situation. The fix that works depends entirely on the cause.
Cause 1: Too Many Cookies (Most Common)
Cookies are tiny text files that websites store in your browser to remember your preferences, keep you logged in, and track your activity. Every time you visit a website, your browser sends all of that site’s stored cookies back in the request headers.
The problem arises when a site sets an excessive number of cookies over time. Each cookie adds bytes to your headers. Once the combined size of all cookies exceeds the server’s header size limit (typically 8KB–16KB), you get a 431 error.
This is especially common when you use the same browser for many websites over months or years without clearing cookies, or when you’re a developer testing multiple projects on localhost, and all projects share the same cookie pool.
Cause 2: Extremely Long URL / Referrer Header
The Referer header tells the server what URL you came from before clicking a link. URLs with heavy tracking parameters (like those from Google Ads, email marketing platforms, or affiliate links) can become extremely long.
https://example.com/page?utm_source=google&utm_medium=cpc&utm_campaign=spring_sale_2026&utm_content=banner_ad_v3&gclid=EAIaIQobChMI...
A referrer URL this long can exceed the header size limit, triggering a 431 error.
Cause 3: Oversized Single Header Field
Sometimes it’s not the total number of headers that’s too large, but a single header. Authentication headers (Authorization) that carry long JWT tokens or API keys are a common culprit. A single JWT token can easily be 2KB–4KB, and a server configured for small header limits will reject the request.
Cause 4: Server Configured With Very Low Header Limits
Different web servers have different default limits for header sizes. Apache, Nginx, and Node.js all have configurable limits. If a server is configured unusually low (sometimes deliberately for security hardening), even normal browser requests might trigger a 431 error for many visitors.
Cause 5: Too Many Custom HTTP Headers
Applications, especially APIs, web apps, and developer tools, sometimes add many custom headers to requests. If an application is poorly coded or a plugin/middleware adds redundant headers, the total header count and size can grow beyond server limits.
Cause 6: Improper Cookie Caching by CDN or Proxy
Content Delivery Networks (CDNs) and reverse proxies sometimes cache and re-send headers incorrectly. In rare cases, stale or duplicated cookie headers get stacked, creating headers much larger than the original client intended to send.
Cause 7: Localhost / Development Environment Overlap
This is a very specific but extremely common cause for developers. If you run multiple projects on localhost and each project sets its own cookies under the localhost domain, all of those cookies accumulate and get sent with every localhost request. This quickly exceeds header limits.
Quick diagnosis: Open Chrome DevTools (F12) → Network tab → Reload the page → Click the failing request → Look at the Request Headers section. If the headers panel is very long or the Cookie line contains a massive string of values, cookies are almost certainly your problem.
Also Read: What to Do After Buying a Domain Name
How to Fix HTTP Error 431 in 3 Steps
We’ve structured this as 3 steps that progressively go deeper. Most people resolve the error at Step 1. Website owners may need to go all the way to Step 3.
STEP 1: Clear Cookies & Fix Browser-Side Issues
Resolves 80%+ of 431 errors for visitors in under 2 minutes
1A: Clear Cookies for the Specific Website
The fastest fix. Instead of wiping all your browser cookies (which would log you out of everything), try clearing cookies just for the problem site first.
In Google Chrome:
- Click the padlock or info icon (ⓘ) in the address bar
- Click “Cookies and site data.”
- Click “Manage cookies.”
- Find the site’s domain, select it, and click “Remove.”
- Reload the page
In Mozilla Firefox:
- Click the padlock icon in the address bar
- Click “Clear cookies and site data.”
- Confirm and reload
1B: Clear All Browser Cookies & Cache
If targeted deletion didn’t work, perform a full clear:
Chrome: Settings → Privacy and Security → Clear browsing data → Select “Cookies and other site data” + “Cached images and files” → Time range: All time → Clear data
Firefox: Settings → Privacy & Security → Cookies and Site Data → Clear Data
Edge: Settings → Privacy, search, and services → Clear browsing data → Choose what to clear
Safari: Safari menu → Preferences → Privacy → Manage Website Data → Remove All
1C: Shorten the URL (For Long Referrer URLs)
If you clicked a link with a very long URL and got the 431 error, try navigating directly. In your browser’s address bar, delete everything after the question mark in the URL:
BEFORE: https://shop.com/product?utm_source=email&utm_medium=promo&utm_campaign=spring_sale_2026&gclid=AbC123...
AFTER: https://shop.com/product
This removes all the tracking parameters and typically resolves the error immediately for that visit.
1D: Test in Incognito / Private Mode
Open a Private/Incognito window (Chrome: Ctrl+Shift+N • Firefox: Ctrl+Shift+P • Edge: Ctrl+Shift+N) and try visiting the same URL.
Incognito mode starts with a clean slate, no cookies, no cached data. If the site loads fine in Incognito, your regular browser’s stored cookies are the problem. Clearing cookies (Step 1A/1B) will fix it for your normal browsing session.
If the site loads fine in Incognito but not in your regular browser, you’ve confirmed the problem is with stored cookies. Step 1A or 1B will permanently fix it.
STEP 2: Check & Fix URL Parameters and Headers
For visitors with long URLs, and website owners with tracking/analytics setup
2A: Remove Unnecessary URL Query Parameters
If you manage a website and your visitors are hitting 431 errors, overly long UTM tracking parameters or affiliate URL strings may be the cause. Here’s how to address this:
- Use Google’s Campaign URL Builder to generate only the parameters you actually need, and avoid stacking redundant tracking codes
- Install a URL shortener or redirect plugin if using WordPress (e.g., Pretty Links or Redirection) to clean up outbound links
- Audit your email marketing links; email platforms often append long tracking parameters automatically. Check if all of them are necessary
2B: Inspect Request Headers in Browser DevTools
To see exactly which header is causing the problem:
- Press F12 (or right-click anywhere → Inspect) to open Chrome DevTools
- Click the Network tab
- Reload the page that shows the 431 error
- Click the failing request in the Network panel
- Select the Headers tab in the panel that appears
- Scroll to the Request Headers section
- Look at the size of the Cookie header. If it’s excessively long (hundreds or thousands of characters), cookies are your problem
Total request headers exceeding roughly 8KB–16KB is typically where servers start refusing requests, though this varies by server configuration.
2C: Fix Localhost Cookie Overflow (For Developers)
If you’re a developer hitting 431 on localhost across multiple projects:
- Open Chrome DevTools → Application tab → Storage → Cookies → http://localhost
- You’ll likely see a very long list of cookies from multiple projects
- Select all and delete them
- Alternatively, use different ports for different projects (e.g.,:3000,:3001,:3002) AND set project-specific cookie names to prevent overlap
Developer tip: Use browser profiles (Chrome’s profile switcher) to separate projects. Each profile maintains its own isolated cookie store, eliminating localhost cookie overflow permanently.
Also Read: Compare COM, ORG, NET, BIZ & CO Domains
STEP 3: Fix Server-Side Configuration (For Website Owners)
For site owners whose visitors regularly report 431 errors
3A: Increase the Server Header Size Limit
If your visitors are consistently hitting 431 errors and clearing cookies doesn’t help, your server’s header limit may be configured too low. Here’s how to adjust it for the most common servers:
For Apache:
Edit your Apache configuration file (httpd.conf or .htaccess): LimitRequestFieldSize 16384
The default is 8,190 bytes. Increasing to 16,384 (16KB) gives more headroom without significant security risk. Restart Apache after making this change.
For Nginx:
Edit your nginx.conf file and add or update inside the http or server block: large_client_header_buffers 4 16k;
This sets 4 buffers of 16KB each for large headers. Reload Nginx with: sudo nginx -s reload
For Node.js (Express/HTTP):
When creating your HTTP server, pass a maxHeaderSize option: const server = http.createServer({ maxHeaderSize: 16384 }, app);
Or set the flag when starting Node: node –max-http-header-size=16384 server.js
3B: Audit and Reduce Cookie Usage on Your Website
If server limit changes feel like a band-aid, the proper long-term fix is reducing the number and size of cookies your site sets:
- Review all plugins, analytics tools, and ad scripts on your site; each may be setting its own cookies
- Consolidate data into fewer, smaller cookies rather than using separate cookies for every setting
- Set appropriate cookie expiry dates; cookies that never expire stack up indefinitely in visitors’ browsers
- Use localStorage or sessionStorage for client-side data where security allows, instead of cookies
- For WordPress sites: deactivate plugins one by one and test to identify which plugin is setting excessive cookies
3C: Implement HTTP Header Compression (H2 / HTTP/2)
HTTP/2 includes HPACK header compression by default, which dramatically reduces header sizes. If your server is still running HTTP/1.1, upgrading to HTTP/2 is one of the most effective long-term solutions to header bloat, and it also improves overall site speed.
Most modern hosting providers (including those supporting WordPress, Shopify, and Wix’s infrastructure) support HTTP/2. Check your hosting control panel or ask your host to confirm HTTP/2 is enabled.
Important: Never set your server’s header size limit excessively high as a lazy fix. Very large header limits can expose your server to HTTP header injection attacks and buffer overflow vulnerabilities. Increase limits conservatively and address the root cause of cookie bloat.
Also Read: Connect Domain to WordPress, Wix, Shopify
Quick Summary: Which Fix Do You Need?
| Your Situation | Most Likely Cause | Go To Step |
|---|---|---|
| I’m a visitor, and the error just started | Too many accumulated cookies | Step 1A or 1B |
| I clicked a long tracking link and got 431 | Referrer URL too long | Step 1C |
| Works in Incognito, not the normal browser | Stored cookie overflow | Step 1A: Clear site cookies |
| I’m a developer, failing on localhost | Multiple project cookies overlap | Step 2C |
| My website visitors are reporting 431 | Excessive cookies are set by the site | Steps 2B + 3B |
| Error persists after clearing cookies | Server header limit too low | Step 3A |
| Heavy analytics/marketing setup on site | URL parameters/cookie stacking | Steps 2A + 3B |
How to Prevent HTTP Error 431 in the Future
Once fixed, here’s how to make sure you don’t encounter this error again:
For Visitors
- Clear your browser cookies every 1–3 months. It takes 30 seconds and prevents cookie overflow
- Use browser profiles to separate work and personal browsing, which limits cookie accumulation per profile
- Consider a browser extension that alerts you when cookie storage for a site gets unusually large
For Website Owners
- Regularly audit the cookies your site sets, use Chrome DevTools → Application → Cookies to inspect
- Set appropriate expiry on all cookies; avoid ‘never expire’ unless genuinely necessary
- Minimise the number of third-party tracking scripts; every analytics, ad, and retargeting tool adds its own cookies
- Enable HTTP/2 on your server to benefit from built-in HPACK header compression
- Set up monitoring alerts for HTTP 4xx error rates, a spike in 431 errors will be visible before it becomes a widespread user complaint
For Developers
- Use browser profiles or separate browsers for different local projects
- Prefix cookie names with the project name to make identification and cleanup easier (e.g., myapp_session vs session)
- Use short-lived sessions and token expiry to prevent cookie accumulation
- Implement header size monitoring in your API/backend to catch bloat before it reaches users
Domain tip: How you configure your domain can affect cookie scope. For example, using subdomains for separate sections of your site (shop.yourdomain.com vs blog.yourdomain.com) isolates cookies per subdomain, preventing them from stacking up site-wide. Read our guide on domain extensions to understand how domain structure affects your setup.
Also Read: COM Domain: Hot for Startups
Frequently Asked Questions (FAQ)
Is HTTP Error 431 dangerous?
No, it’s not a sign of a security breach or malware. It’s simply the server telling your browser: “Your request headers are too large for me to process.” It’s a configuration or data-size issue, not a security incident.
Why does the 431 error only appear on one website and not others?
Different servers have different header size limits. A site running on a server with a very low limit will reject requests that other sites accept just fine. The cookies you’ve accumulated specifically for that site also play a role; you may have many cookies for one site and very few for others.
Will clearing cookies log me out of websites?
Yes. Clearing cookies will log you out of any website that uses cookies to maintain your login session. This is expected and safe. You’ll simply need to log back in. If you clear cookies only for the specific problem site (Step 1A), you’ll only be logged out of that one site.
The 431 error happens on my own website. Why can’t my visitors fix it by clearing cookies?
You’re right that clearing cookies is a visitor-side workaround, but it’s not a true fix if your site is the one generating excessive cookies. If your marketing, analytics, or plugin setup is setting dozens of cookies per visitor, every new visitor will eventually hit the 431 error as their cookie store fills up. The proper fix is to audit and reduce cookie usage on your site (Step 3B).
Does HTTP Error 431 affect SEO?
Yes, indirectly. If Googlebot encounters 431 errors when crawling your site, it cannot index those pages. Additionally, visitors who hit this error leave immediately, driving up bounce rate. Both factors can negatively impact your search rankings over time. Resolving 431 errors promptly is important for both user experience and SEO health.
What is the difference between HTTP 431 and HTTP 400?
Both are client-side errors. HTTP 400 (Bad Request) is a generic error meaning the server couldn’t understand the request; it could be caused by malformed syntax, invalid parameters, or many other issues. HTTP 431 is a specific subset of this: the request is rejected specifically because the header fields are too large. Think of 400 as the general category and 431 as one specific type within it.
Is there a way to see the maximum header size my server allows?
Yes. For Apache, run: apache2ctl -t -D DUMP_RUN_CFG and look for the LimitRequestFieldSize value. For Nginx, check your nginx.conf for large_client_header_buffers. For Node.js, the default is 16KB unless changed. You can also use tools like Postman or curl to send a test request and observe the response.
Final Thoughts
HTTP Error 431, Request Header Fields Too Large, looks intimidating, but is almost always fixable in minutes once you know what’s causing it.
To recap the 3-step approach:
- Step 1 (Visitor Fix): Clear cookies for the site or your whole browser, and try shortening the URL. Solves 80%+ of cases.
- Step 2 (Inspect Headers): Use Chrome DevTools to identify which header is bloated. Audit URL parameters and fix the developer’s localhost overlap.
- Step 3 (Server Fix): If visitors persistently hit the error, adjust your server’s header size limit (Apache/Nginx/Node.js) and audit your site’s cookie footprint.
The underlying message of a 431 error is always the same: too much data is being sent in the HTTP request headers. Fix the data. Fix the error.
Fixed your 431 error and want to optimise your whole web setup? At HashedDomains.com, we make domain registration and DNS management clean and simple, so your domain, SSL, and server all work together without friction. Register your domain today.




