What Is a 400 Bad Request Error (and How Can I Fix It)?
Cloud & Internet
Summary
- A 400 Bad Request error can prevent you from accessing a website.
- You can resolve the error by trying solutions like flushing the DNS cache, clearing the browser cache, or removing a problematic extension.
- If nothing works, it suggests the issue is on the website’s end, and there’s not much you can do except wait for the website developers to fix the problem.
A 400 Bad Request error occurs when a request sent to the website server is incorrect or corrupted, and the server receiving the request cannot understand it. While the issue is often on the website itself and beyond your control, there are instances where you may be able to fix it.
What Is a 400 Bad Request Error?
A 400 Bad Request error happens when a server cannot understand a request that’s been made of it. It’s called a 400 error because that’s the HTTP status code that the web server uses to describe that kind of error.
A 400 Bad Request can happen for many reasons. Perhaps you’ve mistyped a URL and the server can’t return a 404 error. Or maybe your web browser is trying to use an expired or invalid cookie.
Some servers that are not configured properly can also throw 400 errors instead of more helpful errors in some situations. For example, when you try to upload a file that’s too big to some sites, you might get a 400 error instead of an error letting you know about the maximum file size.
Just like with 404 errors and 502 errors, website designers can customize how a 400 error looks. So, you might see different looking 400 pages on different websites. Websites might also use slightly different names for this error, like “400 Bad Request” or “HTTP Error 400”.
Often, you can do something to fix getting a 400 error, but figuring out exactly what can be challenging because of the vague nature of the error. Here are some things you can try.
Refresh the Page
Refreshing the page is always worth a shot. Many times the 400 error is temporary, and a simple refresh might do the trick. Most browsers use the F5 key to refresh, and also provide a refresh button somewhere on the address bar.
Double-Check the Address
The most common reason for a 400 error is a mistyped URL. If you typed a URL into your address box yourself, it’s possible you mistyped. If you clicked a link on another web page and were shown a 404 error, it’s also possible that the link was mistyped on the linking page. Check the address and see if you spot any obvious errors. Also, check for special symbols in the URL, especially ones that you don’t see in URLs often.
Perform a Search
If the URL you are trying to reach is descriptive (or if you know roughly the name of the article or page you were expecting), you can use the keywords in the address to search the website. In the example below, you can’t really tell from the URL itself if anything is mistyped, but you can see some words from the name of the article.
Armed with that knowledge, you can perform a search on the website with the relevant keywords.
That should lead you to the correct page.
The same solution also works if the website you are trying to reach changed the URL for some reason and did not redirect the old address to the new one.
If the website you’re on doesn’t have it’s own search box, you can always turn to Google, using the “site:” operator to search only the website in question for the keywords. For example, if you want to search for the above keyword on How-To Geek, type site:howtogeek.com Windows 11 24H2 update into the browser’s URL bar and press Enter.
Clear Your Browser’s Cookies and Cache
Many websites report a 400 error because the cookies they are reading are either corrupt or too old. Some browser extensions can also change your cookies and cause 400 errors. It’s also possible that your browser has cached a corrupt version of the page you’re trying to open.
To test out this possibility, you’ll have to clear your browser cache and cookies. Clearing the cache won’t affect your browsing experience much, but some websites may a take a couple of extra seconds to load as they re-download all the previously cached data. Clearing cookies means you’ll have to sign in again to most websites.
To clear cookies and cache in Chrome, click the three dots in the top-right corner and select “Settings.” Next, go to Privacy & Security > Delete Browsing Data.
Check the boxes for “Cached Images and Files” and “Cookies and Other Site Data,” then click “Clear Data.”
Similarly, you can clear cookies and cache on other browsers, such as Mozilla Firefox and Microsoft Edge.
Flush Your DNS
Your computer might be storing outdated DNS records that are causing the errors. A simple flushing of your DNS records might help solve the problem. It’s easy to do, and won’t cause any problems to try.
To flush the DNS cache on Windows, open the Command Prompt as an administrator, type ipconfig /flushdns in the Command Prompt window and press Enter. You’ll see a message saying, “Successfully Flushed the DNS Resolver Cache,” indicating that the cache has been cleared.
Similarly, you can flush the DNS cache on macOS. After flushing the DNS, restart your device and check if the issue is resolved.
Uninstall the Problematic Extension
An extension installed on your browser could be the reason behind the error. To identify the problematic extension, navigate to your browser’s extensions page. In Chrome, click the Extensions icon in the top bar and select “Manage Extensions” from the menu. Then, disable all the extensions you have installed.
Next, try accessing the website that was displaying the 400 error. If the error no longer appears, it confirms that one of the extensions you just disabled was causing the issue. To pinpoint the problematic extension, start enabling the extensions one by one. After enabling each extension, access the website again. Look for the extension that triggers the error when enabled.
Once you identify the problematic extension, you can either keep it disabled permanently or remove it from your browser.
Check for File Size
If you’re uploading a file to a website and that is when you get a 400 error, then the chances are that the file is too big. Try to upload a smaller file to confirm if this is causing the issue.
Try Other Websites
If you’ve been trying to open a single website and getting 400 errors, you should try to open other websites to see if the problem persists. If it does, it might be a problem with your computer or networking equipment rather than the website you’re trying to open. In this case, run through some network troubleshooting steps.
Restart Your Computer and Other Equipment
This solution is hit or miss, but restarting your computer and especially your networking equipment, such as your router and modem, is a common way to resolve many server errors.
I hope the solutions provided have helped you resolve the issue. If not, the website itself might be at fault. Try reaching out to the website through its contact page (if it’s working) or via social media. Chances are they’re already aware of the issue and working on a fix.