How to Fix a 400 Bad Request

How to Fix a 400 Bad Request

Last modified: November 10, 2020

FAQ
Cloudways

One of the most common WordPress errors you’re going to find is the 400 Bad Request error. The main reason why it’s going to be found more quickly, is because it’s a catch-all response to an error. There isn’t just one cause. So, here are some reasons why it might happen and what you can do to fix it.

Show More

* This button will show the rest of the post and open up an offer from a vendor

Why does a 400 Bad Request Happen?

There are numerous reasons why a 400 Bad Request may occur. For example, it could be because of an incorrectly typed URL (though that normally displays a 404 error), a malformed syntax, or a URL that includes illegal characters. These mistakes are rather easy to make.

However, a 400 error could be because of a corrupted browser cache, or cookies, or the DNS data stored locally is not in sync with registered DNS information.

If you’re trying to upload a file to your website that is too large, you might also see the error appear. And there are issues that can be caused be a generic server error.

How to Fix a 400 Bad Request

Here are several options to fix the 400 Bad Request error on your website.

Check the URL you Submitted

The first thing to do is to check the URL that you requested. It is very easy to accidentally enter in an illegal character or make a typo in the spelling of the domain name. If you’re entering in a long, complicated URL then you might want to use an online URL encoder/decoder. These can detect illegal characters within the URL.

Once you’ve checked the URL, try the website again. If it now works, you’ve solved the problem.

Clear the Browser Cache

If locally stored files for the website have become corrupted, this can cause a 400 Bad Request error. Therefore, you need to go to your browser’s history and delete all the cache. Different browsers have different ways to achieve this, but you need to ensure that the entire history is removed. If the data has corrupted for one website, it is likely it has been for others too.

While you could do this at a different time, you might also want to remove all the browser cookies as well. It saves time doing it later. However, this will also remove other aspects that can make your internet browsing experience a lot better.

Once you’ve done one, or both of these, try reloading the page. If the 400 error has now gone, you have solved the problem. Otherwise carry on with the repairs.

File Size Exceeds Server Limit

If you’re uploading a file to your WordPress website and you’re seeing this, the file size is too big. There are ways that you can solve this. But first, check that it is because of the file size by trying to upload a smaller file, like a small jpg image. If that works, then you know it is the file size.

There are numerous tools online that can help you compress files. Some of these are free.

Clear the DNS Cache

If the local DNS lookup data is now out-of-date or corrupted, then there could be a 400 Bad Request error. This information is stored on the operating system, not within a browser. Therefore, you have to clear the DNS Cache from scratch.

Deactivate Browser Extensions

The final aspect that might be affecting the performance of a website, and you seeing a 400 Bad Request error is if you have any browser extensions that affect how a website cookie works on your computer. Try deactivating it and then reloading the page.

Final Word: How to Fix a 400 Bad Request

If you’re getting a 400 Bad Request error, there are many reasons for this. Try using the fixes and see if that solves the problem.

Recap:
Save 4 Later
Email liked links to yourself