400 Bad Request Error (Fixed) 7 Easy Ways

It feels really bad when a website shows an error like this. This error not only frustrates users but also affects the ads and sales earnings of the site, which could be devastating for your business.

Today we’re gonna look at one of the most common errors “400 Bad Request”, we’ll see how to fix it and what causes it.

400 Bad Request Error In Little More Detail

This error indicates that something is wrong with the client-side, but sometimes it could be due to an error in your site. Error 400 is usually returned when the server finds the error doesn’t fall in any of the other status code categories.

If there is an error in the URL String, browser cache & cookies, or if the file size is too large, you might encounter this error.

This error is also known as 400 error or HTTP error 400.

Now let’s look at how to fix this!

How To fix 400 Bad Request Error

Fixing this issue doesn’t require any specific skill, it can be done by non-techie people, but make sure to follow each step closely, especially, if you’re a beginner and don’t know much about how the web works.

Before proceeding to the steps, I wanna share something, you will notice that several steps involve cleaning local cache data.

Browser caching is used by many website owners, they do that to load their site faster, if they stop doing that, then it’s true that users won’t face too many connection error issues, but it would significantly reduce website loading speed which won’t be very good for users like us who want everything as quickly as possible.

According to PCmag, Browser Cache is a temporary storage area in memory or on disk that contains the most recently downloaded Web pages. When you go from Web page to Web page, caching those pages in memory lets you immediately go back to a page without having to load it from the Web again.

Solution 1: Clear Browser Cache

You might be aware of how to clear browser cache because most of us use the browser for the internet almost daily. Clearing browser cache is the most effective way to fix this issue.

If you don’t how to clear your browser cache, then follow the steps below.

How to clear browser cache in Google Chrome

Google chrome is my favorite browser as it is very fast and easy to handle, follow the steps below to clear cache in Google Chrome.

  • Step 1: Open Google Chrome

To clear cache in Chrome, you first need to open it.

  • Step 2: Click On The Kebab Menu and Choose More Tools

Once you open the chrome, you need to click on the top right three vertical dots, also known as the kebab menu, then select more tools to find the Clear Browsing Data option.

Chrome>Kebab Menu>Clear Browsing Data

You can also use the shortcut by pressing ctrl+shift+delete to go directly to the clearing browser cache area.

  • Select All Time And Click On Clear data

Now, you’ll see the option/drop-down where you can select the time range, my advice is to select “All Time”, however, you can try clearing the last 24 hours or 7 days data to see if this fixes the issue or not.

After selecting the time range, click on Clear Data. (Also, be double sure that “Cache Images and files” and “Cookies and other site data” is selected)

Chrome would take a minute or two to clean up the cache, till then, do not close it.

How to clear browser cache in Firefox

Credit for the screenshots goes to its.uiowa.edu

  • Step 1: Click on the Tools bar.
  • Step 2: Click on Options (On Mac, it’s labeled Preferences).
    Options menu highlighted after choosing Open menu button in Mozilla Firefox
  • Step 3: On the menu to the left, select Privacy & Security.
  • Step 4: Under the Cookies and Site Data option, click the “Clear Data…” button.
    Cookies and Site data menu in Mozilla Firefox
     
  • Step 5: Select only the two options and hit clear now.
    Cookies and Site Data and Cached Web Content both selected to be cleared in Mozilla Firefox
     
  • Step 6: If on a Windows computer, close and re-open Firefox to save your changes. If on an Apple computer, go to the Firefox menu on the top menu bar and select Quit for the changes to take effect.

How to clear cache in Safari

  1. Click on Safari on the top menu bar.
  2. Click Preferences.
    Preferences menu highlighted in Safari menu along top of macOS
     
  3. Click the Privacy tab.
  4. Click Manage Website Data…
    Manage Website Data... button highlited in Safari Privacy menu in macOS
  5. Click Remove All.
  6. Click Remove Now.
    Prompt to Remove Now after selecting Remove All in Safari Privacy menu in macOS
     
  7. Go to the Safari menu on the top menu bar.
  8. Select Quit to close Safari and save your changes.

Solution 2: Clean Browser Cookies

Thankfully, the steps of clearing browser cookies are almost identical to clearing browser cache. Instead of selecting cache, you just need to select cookies, and that’s it.

You can try clearing cookies if clearing the browser cache didn’t work. A website normally uses several cookies to track a few details, if any one of them is expired or becomes corrupted, then it may cause this 400 bad request error.

The steps are pretty easy, as I said, the steps are almost similar to clearing cache, still here are the steps you need to follow to clear cache in chrome.

(Credit: Google)

  1. On your computer, open Chrome.
  2. At the top right, click More More.
  3. Click More tools and then Clear browsing data.
  4. At the top, choose a time range. To delete everything, select All time.
  5. Next to “Cookies and other site data” and “Cached images and files,” check the boxes.
  6. Click Clear data.

Apple users can check the guide published by Apple itself.

Solution 3: Flush DNS Lookup Cache

Sites usually try to record information about visitors, which is why you are often asked if you allow the use of cookies. When users want to eliminate the information collected, they clear the cache from their web browsers.

What many people don’t understand, though, is information is also saved in the domain name server (DNS) cache. 

The 400 Bad Request can occur when the DNS data stored locally is out of sync with recorded DNS information.

When you type a domain, such as www.hostinggrow.com, into a web browser, the name has to be turned into an IP address before the effects are presented. DNS servers perform this change from name to IP address and vice versa.

Even with multiple DNS servers available, it can take some time to get a response. To fix this, operating systems build their own cache for site addresses that have been requested and resolved.

These DNS caches save information for a certain period. This means if the user comes back to a recently visited website, rather than looking up the information all over again, the web browser can get the details from the saved cache and return outcomes more quickly.

How To Clear DNS Cache

Here is the guide by Kinsta on how to clear DNS cache.

Depending upon your operating system or browser, the method used to flush your DNS cache will vary. As for why you would want to clear your DNS cache, this may change as well. A couple of reasons include:

  • Troubleshooting connectivity issues
  • Troubleshooting and/or resolving DNS spoofing (e.g. DNS cache poisoning) issues
  • Resolving stale content issues (e.g. if a website has moved servers)

At the time of writing this post, we have gathered the latest operating system versions of both Mac and Windows and outlined the instructions below to flush your OS’s DNS cache.

  • Windows – You need to open your command prompt or click Run when you open your start menu. Then, enter the command: ipconfig /flushdns. If the command correct, you will get the following message “Successfully flushed the DNS Resolver Cache.”.
  • Mac – For mac you need to open your command line interface or Terminal and then enter the following command: sudo killall -HUP mDNSResponder. You may require to enter your administrator password. If the command successful the system will not return any output.

Also, to clear the DNS cache in Chrome browsers, go to chrome://net-internals/#dns and click the “Clear Host Cache” button.

Solution 4: Fix The Uploaded Files Exceeds The Server limit

Uploading a heavy file on your website can also be the reason behind this error. If you have faced this error right after uploading something heavy, then there is a high possibility that the error has appeared because of it.

Try to reduce the size of the file or increase the upload limit of your WordPress site. You can increase the upload limit of your WordPress site by adding a one-line code to your Wp-config file or contacting your host.

The file limit should be between 256MB to 512MB.

There are in fact a lot of good online compressors tools available that you can use to reduce the file size.

Solution 5: Check The URL

The most typical reason for a 400 Bad Request error is because the URL was entered wrong or the link that was clicked on points to a distorted URL with a specific kind of error in it, like a syntax problem.

You’ll be shocked to know but this is the most common reason behind the 400 Bad Request error. Especially, check for extra, typically non-allowed, symbols in the URL like a percentage character. While there are perfectly valid uses for something like a % character, you won’t often find one in a standard URL.

Solution 6: Refresh The Page

Refreshing the page is still worth a shot. Numerous times the 400 error is not permanent, and a simple refresh might do the trick. Most browsers use the F5 key to refresh, and also show a Refresh button somewhere on the address bar. It doesn’t fix the problem usually, but it takes just a second to try.

Solution 7: Deactivate The Extension

Extensions sometimes don’t work in favor of us. Try to turn off or deactivate the extension and see whether the site is working or not.

Also, try not to use poorly rated chrome extensions as they slow down your browser and increase the chance of errors like these.

I hope this post was helpful to you.

Thanks for reading!

Sumit
Sumit

Sumit is a regular contributor to Hostinggrow.com. He has 6 years of experience in blogging, and he loves football, his favorite player is - Lionel Messi (GOAT), but he has no hate for Ronaldo.

Articles: 54

Leave a Reply

Your email address will not be published.