Key takeaways:
- 400 Bad Request is a client-side error.
- Incorrect URL, files tool large, outdated cookies, and DNS cache triggers a 400 Bad Request.
- Unstable internet connection can also cause a 400 error.
It’s a bad day to encounter a 400 Bad Request, but don’t worry, you’re not alone. The 400 Bad Request is a common error users face when browsing a website.
In this article, we’ll explain the 400 Bad Request error, why it happens, and how to fix it.
What does 400 Bad Request mean?
400 Bad Request means the website’s server cannot understand a user’s request. This usually happens when something is wrong with the user’s request, causing the server to refuse to process it.
The 400 Bad Request is part of the 4xx client error family (e.g., Error 401 and Error 403). This line of error message indicates that the problem is on the user’s side, and not on the server.
When this happens, the server responds with a message like this:
What causes a 400 Bad Request?
Some common reasons why you might encounter a 400 Bad Request include:
- Malformed request syntax
- Unsupported file types
- Outdated cookies
- Corrupted DNS cache
Error | Cause |
Malformed request syntax | You’re using a broken URL. It may have outdated links or missing or wrong characters. |
Unsupported file types | You’re trying to upload a file that either exceeds the site’s server limits or has a type that’s not supported by the website’s server. |
Outdated cookies | Browsers can sometimes store outdated cookies, stopping the website from loading correctly. |
Corrupted DNS cache | Your device saved outdated or broken DNS data, which blocks connection to the site. |
How to fix 400 Bad Request
Here are six simple ways to fix a 400 Bad Request:
- Fix URL
- Clear browser cache and cookies
- Flush DNS
- Compress your files
- Deactivate browser extensions
- Check your internet connection
1. Fix URL
Double-check the web address you entered. Make sure there are no typos, unnecessary spaces, or invalid characters. Even minor mistakes trigger a 400 Bad Request error.
If you click on a link and land on a 400 Bad Request error page, the link might have a problem. Try manually typing the link instead.
Sometimes, websites update their pages, affecting the page’s link. So, if you encounter a 400 Bad Request after clicking a link, consider going to the site’s homepage and navigating to the correct page from there.
If you’re a website owner, then make sure you apply website navigation best practices.
2. Clear browser cache and cookies
Browsers store cache and cookies to improve browsing speed and personalize the user experience (UX). However, these data can become outdated over time, leading to the 400 Bad Request error code.
To fix this, go to your browser’s settings and clear your cache and cookies. While steps vary depending on your web browser, the process is usually the same. Here’s how.
- On the upper right-hand corner, click on the three vertical dots or the kebab menu icon.
- Click Settings.
- On the left-hand side, click Privacy and Security.
- In the Privacy and Security tab, click Delete browsing data.
- Uncheck Browsing History if you don’t want to erase your browsing history.
- Click Delete Data.
Microsoft Edge
- On the upper right-hand corner, click the meatballs menu icon.
- Click Settings.
- On the left-hand side, click Privacy, search, and services.
- In the Privacy, search, and services tab, click Clear browsing data.
- Click Choose what to clear. Note that there are two ‘Clear browsing data’ options. You should choose the first one.
- Uncheck Download and Browsing History if you want to retain your history.
- Click Clear now.
3. Flush DNS
Your device temporarily stores Domain Name System (DNS) records like IP addresses and domain names. This process helps websites load faster when you revisit them. Unfortunately, this cache can also store outdated or broken data, triggering a 400 Bad Request.
To fix this, consider flushing your DNS cache. Here’s how.
On Windows 7, 8, 10, and 11
- On the Windows search bar, type cmd to access the Command Prompt.
- Open the Command Prompt.
- Type ipconfig /flushdns in the Command Prompt and press Enter.
- Reload the website.
On macOS 11 Big Slur and later versions
- Use the Spotlight search to look for the Terminal app.
- Open Terminal app.
- On the Terminal app, type sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- Type your administrator password. Note: Your password will not be visible when you type.
For older macOS versions, try the following command
MacOS version | Command |
MacOS Catalina | sudo killall -HUP mDNSResponder |
Mojave | sudo killall -HUP mDNSResponder |
High Sierra | sudo killall -HUP mDNSResponder |
Sierra | sudo killall -HUP mDNSResponder |
El Capitan | sudo killall -HUP mDNSResponder |
Mavericks | sudo killall -HUP mDNSResponder |
Mountain Lion | sudo killall -HUP mDNSResponder |
Lion | sudo killall -HUP mDNSResponder |
macOS 10.10 Yosemite | sudo discoveryutil udnsflushcaches |
4. Compress your files
If you’re uploading large files, like video and audio files, check the website’s file size limit first. Uploading files that are too large can cause a 400 Bad Request.
To avoid this, reduce your file size by compressing it before uploading. Consider using free online tools, such as compressor.io or Compress a PDF by Adobe, or built-in compression software to lower the size of your files, making it easier for the server to process.
5. Deactivate browser extensions
Some browser extensions, like password managers and ad blockers, interact directly with your browser’s cookies and site data. These extensions contain your login credentials, domain names, and known ad scripts.
Once these extensions interfere with the communication between your browser and the website, a 400 Bad Request error appears. To troubleshoot:
- Deactivate your extensions at once.
- Enable each extension one by one. For each extension, reload the page to see which extension is causing the 400 error.
- Once you’ve identified the extension that’s causing the 400 Bad Request, consider keeping it disabled or replacing it with another alternative.
6. Check your Internet connection
Every time you try to access a website, your browser sends a data request to the site’s server. But if you have unstable internet, the request gets cut off and arrives incomplete, triggering a 400 Bad Request.
To ensure a complete data exchange, ensure you have a stable internet connection. You can use free tools like Google Fiber to test your internet speed. High ping times (over 150ms) or extremely low speeds could indicate connection issues.
If your internet is unstable, consider switching to a different Wi-Fi network or using mobile data.
Ensure a smooth browsing experience
Yes, a 400 Bad Request is frustrating, but you can fix it without much technical knowledge. By following the troubleshooting steps we’ve covered, like double-checking the URL, clearing your Browser cookies and DNS cache, and testing your internet connection, you can get back online and put this HTTP error behind you.
Are you having issues with other HTTP errors, too? Learn how to fix them with Network Solutions. We offer reliable tools and how-to guides to help you diagnose and resolve website issues.
Frequently asked questions
You can fix a 400 Bad Request error by, ensuring your URL is correct, clearing your browser’s cache and cookies, temporarily disabling your browser extensions, flushing your DNS, and making sure you have a stable internet connection.
400 Bad Request usually happens because of outdated cache cookies. To fix this on Google Chrome, open the kebab menu > Settings > Privacy and Security > Delete Browsing data > Clear Data.
You can encounter a 400 Bad Request when there’s a problem with your request. Browsers send requests to websites to access them. Sometimes, your browser can send an invalid request message framing, usually due to misspellings or missing characters on a URL. This causes the site’s server to refuse to process your request.