Free SEO audit for new clients — claim yours
Home/Blog/Technical SEO/400 Bad Request Error: Causes and How to Fix It
Technical SEO

400 Bad Request Error: Causes and How to Fix It

400 Bad Request Error: Causes and How to Fix It
Table of contents
  1. Key Takeaways
  2. What is a 400 Bad Request error?
  3. 400 vs other common errors
  4. Common causes of a 400 error
    1. 1. Malformed or badly encoded URLs
    2. 2. Corrupted or oversized cookies
    3. 3. Browser extensions and stale data
    4. 4. File uploads that are too large
    5. 5. Invalid form submissions and API calls
    6. 6. Faulty redirects or rewrite rules
  5. How to fix a 400 error as a visitor
  6. How to fix 400 errors as a site owner
  7. Do 400 errors affect SEO?
  8. Common mistakes when dealing with 400 errors
  9. Related Guides
  10. Frequently Asked Questions
    1. What does 400 Bad Request mean?
    2. Is a 400 error my fault or the website's?
    3. How do I fix "Request Header Or Cookie Too Large"?
    4. Does a 400 error hurt SEO?
    5. What is the difference between 400 and 404?
  11. Conclusion
  12. References

Few error messages are as unhelpful as "400 Bad Request". There is no friendly explanation and no hint about what went wrong, just a blank page telling you the server did not like what your browser sent. For visitors it is an annoying dead end; for site owners it can be a sign of broken links, faulty forms or server limits that quietly cost traffic and sales.

The good news is that 400 errors usually have a small number of causes, and most can be fixed in minutes once you know where to look.

This guide explains what a 400 error actually means, the most common causes, step-by-step fixes for visitors and site owners, and how 400 errors affect SEO in 2026.

Key Takeaways

  • A 400 status means the server refused the request because it considered it a client error.
  • Common causes include malformed URLs, corrupted or oversized cookies, browser extensions, large uploads and buggy forms or APIs.
  • Visitors can usually fix it by checking the URL, clearing site cookies and disabling extensions.
  • Site owners should check server logs, fix broken internal links and review header and upload limits.
  • Google does not index URLs returning 4xx codes, so 400s on important pages need fixing quickly.

What is a 400 Bad Request error?

“The HTTP 400 Bad Request client error response status code indicates that the server would not process the request due to something the server considered to be a client error.”

— MDN Web Docs, 400 Bad Request

In other words, the server never got as far as looking for your page. It rejected the request itself. MDN lists malformed request syntax, invalid request message framing and deceptive request routing as typical reasons. The key phrase is "something the server considered to be a client error": sometimes the server's rules are what need changing.

The 400 code belongs to the 4xx family of client errors. If you want a refresher on how it relates to other codes, see our guide to HTTP status codes.

400 vs other common errors

StatusMeaningTypical causeWho usually fixes it
400 Bad RequestRequest rejected as malformed or invalidBad URL encoding, oversized cookies, invalid form or API dataVisitor or site owner
401 UnauthorizedAuthentication requiredMissing or invalid loginVisitor (log in)
403 ForbiddenServer refuses accessPermissions, firewall or security rulesSite owner
404 Not FoundNo resource at this URLDeleted page or broken linkSite owner
5xx Server ErrorServer failed to fulfil a valid requestCrashes, timeouts, misconfigurationSite owner or host

For the neighbouring errors, see our guides to fixing 404 errors and 5xx server errors.

Common causes of a 400 error

1. Malformed or badly encoded URLs

Characters such as spaces, unescaped % signs, stray brackets or doubled-up query strings can make a URL invalid. These often come from copy-pasted links, faulty URL-building code, or tracking parameters appended twice. Our guide to URL parameters covers how to keep them clean.

2. Corrupted or oversized cookies

Browsers send cookies with every request. If a site sets too many or too large cookies, the request headers can exceed the server's limit. Nginx, for example, returns a 400 error when a header field is larger than its buffer.

“A request header field cannot exceed the size of one buffer as well, or the 400 (Bad Request) error is returned to the client.”

— nginx documentation, ngx_http_core_module

Nginx's default for large_client_header_buffers is four buffers of 8K each. Marketing tags, A/B testing tools and consent platforms that each set their own cookies can push a visitor over the limit, producing messages such as "Request Header Or Cookie Too Large".

3. Browser extensions and stale data

Extensions that modify requests, such as privacy tools, ad blockers or header editors, can occasionally produce invalid requests. Outdated cached data can also cause problems after a site changes its setup.

4. File uploads that are too large

Some servers and applications respond with a 400 when an upload exceeds a configured limit, though others use 413 Content Too Large. Either way, the request is rejected before it is processed.

5. Invalid form submissions and API calls

Applications commonly return 400 when submitted data fails validation: malformed JSON, missing required fields or invalid values. A broken contact or checkout form is a conversion problem as much as a technical one.

6. Faulty redirects or rewrite rules

Server rules that build target URLs incorrectly can generate invalid requests. If you manage redirects on Apache, our guide to 301 redirects in .htaccess explains how to test them safely.

How to fix a 400 error as a visitor

  1. Check the URL. Look for typos, spaces, odd symbols or repeated parameters. Try navigating from the homepage instead.
  2. Clear cookies for that site. In your browser's site settings, delete cookies and site data for the domain only, then reload.
  3. Try a private window. If the page loads there, cookies, cache or extensions are the likely cause.
  4. Disable extensions temporarily. Re-enable them one at a time to find the culprit.
  5. Clear your DNS cache if the problem appeared after the site moved hosts.
  6. Reduce the upload size if the error appears when attaching a file.
  7. Contact the site if nothing works; the problem may be on their side.

How to fix 400 errors as a site owner

  1. Reproduce the error. Note the exact URL, browser, and whether you are logged in.
  2. Check server and application logs. Logs usually show the rejected request and often the reason (header too large, invalid characters, validation failure).
  3. Crawl your site. Use a crawler to find internal links returning 400 and fix the source links or templates generating them.
  4. Audit cookies. List every cookie your site and third-party tools set, remove what you do not need and shorten what remains. Our guide to third-party scripts helps identify the worst offenders.
  5. Review server limits. If legitimate requests are being rejected, ask your host or developer to review header buffer and upload limits.
  6. Test forms and APIs. Submit every form with realistic and edge-case data and confirm errors are handled gracefully, with clear messages rather than a bare 400 page.
  7. Check redirects and rewrite rules. Make sure targets are valid, correctly encoded URLs.
  8. Monitor. Set up alerts so new spikes in 4xx responses are noticed quickly; uptime monitoring tools can check key URLs for you.

Do 400 errors affect SEO?

Yes, when they hit URLs that matter. Google's documentation states that it does not index URLs returning 4xx status codes (other than 429), does not use their content, and removes already-indexed URLs that start returning a 4xx.

“Google doesn't index URLs that return a 4xx status code.”

— Google Search Central, How HTTP status codes, and network and DNS errors affect Google Search
ScenarioSEO impactAction
Random malformed URLs from botsNegligibleIgnore unless volume is huge
Internal links pointing to URLs that return 400Wasted crawling and poor user experienceFix the links at the source
Important pages returning 400 to GooglebotPages dropped from the indexFix urgently and request reindexing
400 caused by oversized cookiesMostly affects returning visitors, not GooglebotFix for conversions and user experience

Use the Page indexing report to spot excluded URLs, the URL Inspection tool to see what Googlebot receives, and the Crawl Stats report to track 4xx responses over time.

Common mistakes when dealing with 400 errors

  • Treating every 400 as a server bug. Many are caused by one visitor's cookies or extensions.
  • Raising server limits without fixing the cause. Bloated cookies hurt performance even when they no longer trigger errors.
  • Returning 400 for missing pages. Use 404 or 410 for content that does not exist.
  • Showing a blank error page. A helpful error page with navigation keeps visitors on your site.
  • Ignoring 400s from forms. Every failed submission may be a lost lead or sale.

Frequently Asked Questions

What does 400 Bad Request mean?

It is an HTTP status code meaning the server would not process the request because it considered it a client error, such as malformed syntax, an invalid URL or oversized headers.

Is a 400 error my fault or the website's?

It can be either. Corrupted cookies, a mistyped URL or a browser extension are client-side causes. Badly built links, broken forms, faulty redirects or strict server limits are site-side causes.

As a visitor, clear cookies for that site and reload. As a site owner, reduce the number and size of cookies you set, and if necessary ask your host to review header buffer limits such as Nginx's large_client_header_buffers.

Does a 400 error hurt SEO?

Google does not index URLs that return 4xx codes, and already-indexed URLs that start returning one are removed. A few odd 400s are harmless, but 400s on important pages or internal links should be fixed quickly.

What is the difference between 400 and 404?

A 404 means the server understood the request but found nothing at that URL. A 400 means the server rejected the request itself as malformed or invalid before looking for content.

Conclusion

A 400 Bad Request error means the server rejected a request it considered invalid. Visitors can usually fix it by checking the URL and clearing cookies; site owners should check logs, fix broken links and forms, trim cookies and review server limits. Keep 400s away from important pages, and your users and rankings will both benefit.

Want a full technical audit that catches 4xx and 5xx errors before they cost you traffic? Explore our SEO services or get a quote today.

References

  1. MDN Web Docs: 400 Bad Request
  2. Google Search Central: How HTTP status codes, and network and DNS errors affect Google Search
  3. nginx documentation: ngx_http_core_module (large_client_header_buffers)
  4. Semrush blog: 400 Bad Request error
  5. RFC 9110: HTTP Semantics
Rohit Choudhary
Written byRohit ChoudharyCo-Founder, My SEO Experts

Rohit Choudhary is the co-founder of My SEO Experts and has more than 14 years of hands-on experience in SEO, paid advertising and digital marketing. Since starting out in 2011 he has helped hundreds of businesses grow through practical, data-driven search strategies, and he also serves as a consulting Digital Marketing Director for several US-based companies.

Keep reading

Related articles

Ready to grow your business online?

Get a free, no-obligation proposal tailored to your goals and budget.

CallFree Quote