+254725682556 +254725052660 info@ziprof.co.ke
Client Area

General Knowledge

How to Fix a 400 Bad Request Error on Your Website

A 400 Bad Request error means the server could not understand or process the request your browser sent. Unlike a 404 or 500 error, it usually points to a problem with the request itself, not with the page or the server. In most cases you can fix it in a few minutes without contacting support.

What Causes a 400 Bad Request Error?

A few things commonly trigger this error:

  • Corrupted or outdated cookies stored for the website
  • A URL that is too long, malformed, or contains invalid characters
  • An oversized file upload that exceeds the server's request limit
  • A stale local DNS cache pointing your browser to the wrong server
  • A browser extension interfering with the request
  • A malformed rule in the site's .htaccess file
  • On WordPress sites, a plugin or theme sending a malformed request

Fix It on Your Own Computer First

Start here, since the cause is often on your side rather than the server's.

  1. Clear your browser's cookies and cache for the site, then reload the page.
  2. Check the URL in your address bar for stray characters, extra spaces, or an unusually long query string, and try a shorter or corrected version.
  3. Disable browser extensions (especially ad blockers or privacy tools) one at a time and reload to see if one is the cause.
  4. Try the site in a different browser or on your phone using mobile data. If it loads fine there, the problem is local to your original browser.
  5. Clear your computer's DNS cache in case it is holding an outdated record for the site.
If the error only happens on one device or browser, it is almost always a local cookie, cache, or extension issue rather than a problem with your hosting account.

If the Error Happens for Every Visitor

If the 400 error shows up consistently for other people too, not just you, the cause is more likely on the website's side.

  1. Check whether you recently edited the .htaccess file in your site's root folder. Open it through your control panel's File Manager, rename it to something like .htaccess_old, and reload the site. If the error disappears, the original file had a bad rule and needs to be corrected or rebuilt.
  2. If the site runs on WordPress, log in to wp-admin if you still can, and deactivate plugins one by one (or all at once, then reactivate them individually) to find the one causing the malformed request.
  3. If you recently uploaded a large file through a form on the site, check whether it exceeds your account's upload size limit.

If none of these steps resolve it, the request may be failing further upstream, for example at your DNS or nameserver level. See our guide on clearing your DNS cache for more on ruling that out.