What is HTTP Error 400 and how do you fix it? (2024)

HTTP Error 400 – also known as the Bad Request 400 error – is one that almost all internet users will have encountered at some point. It's displayed when the website server for the page a user is trying to access isn't able to successfully handle a request for information, resulting in a broken page.

HTTP Error 400 can occur for a number of different reasons, but they all prevent a user from accessing a site's resources.

What is HTTP error 503 and how do you fix it? A guide to VPN troubleshooting: fix all your VPN problems

Unlike the HTTP Error 503, or the 502 Bad Gateway error, a Bad Request error usually appears as a result of something the user has done, such as typing in an incorrect URL. This means fixing it is typically far easier. The server itself can be the cause of an HTTP Error 400, but these cases are typically rare.

Depending on the browser you are using, an HTTP Error 400 can result in a blank page, or a page showing a more generic, user-friendly message, as is the case with Opera and Chrome.

However, there are a bunch of other messages you might encounter that all signal an HTTP Error 400, including:

  • Bad Request - Invalid URL
  • Bad Request: Error 400
  • HTTP Error 400 - Bad Request
  • HTTP Error 400. The request hostname is invalid
  • Bad Request. Your browser sent a request that this server could not understand

Website owners are able to customise the page that an HTTP Error 400 will display to visitors. An example of this is when web servers run Microsoft Internet Information Services (IIS), which results in a page breaking down the error in more detail, such as “400.3: Invalid If Header”, “400.2: Invalid Depth Header”, “400.1: Invalid Destination Header”, and more.

HTTP Error 400 causes

There’s a mixture of problems that can lead to a 400 Bad Request error. Here, we’ll go over five typical causes.

1. Bad URL Syntax

It's usually the case that an HTTP Error 400 appears because the user has submitted incorrect URL syntax - in other words, they have either used a URL string that simply does not exist, or contains an invalid character, such as a backslash.

RELATED RESOURCE

Busting nine myths about file-based threats

What’s fact and what’s fiction when it comes to preventing file-based threats

DOWNLOAD FOR FREE

You can trigger an HTTP Error 400 manually, usually by typing "/%" after the URL.

For example, the following URL will send you to a valid page, the page to sign up to our daily newsletter:

'https://www.itpro.com/newsletter-signup'

However, if you were to type this URL in manually and type "/%" at the end of the URL, the request will result in an HTTP Error 400 page - as the server has received a 'Bad Request'.

2. Invalid Cookies

Cookies store information on websites you visit and may also record authentication data to speed up log in. If you can’t log into a website you previously visited, it means the cookie containing your log in data is no longer valid, which can result in an HTTP Error 400.

3. Incorrect file size

You may be trying to upload a file that’s too large to a website. The server will fail to fulfill your request and respond with a 400 error message in such a case.

Keep in mind, the hosting provider sets the maximum upload size limit at the server level. For example, the default file size limit for many WordPress sites ranges from 4MB to 128MB, but can be manually adjusted to much larger sizes.

4. Unsynchronized DNS Cache

Browsers read domain names as IP addresses, which are stored locally in the Domain Name System (DNS) cache to improve the browsing experience. A HTTP Error 400 Bad Request can occur when the DNS data stored locally is out of sync with a website’s registered DNS information during a future interaction.

5. Server error

Servers can cause errors too. To check if there's an issue with the server, try loading a website from a different browser and device. If the website fails to open in Edge, Chrome, Firefox, or IE, it's likely a server-side problem.

How to fix a 400 Bad Request

It’s hard not to be unfazed by an HTTP error that tells you little about the problem. That said, fixing a 400 Bad Request error takes just a few steps. We’ve put together a few useful tips below to help you find your way out.

1. Recheck the URL

Since a malformed URL is the most common cause of the 400 Bad Request error, make sure there are no typing or syntax errors in your URL. Alternatively, for long URLs, consider using an online URL encoder, which automatically detects non-ASCII characters or invalid characters in a URL, saving you time and effort.

2. Check your internet connection

If you keep seeing a 400 Bad Request on nearly every website you visit, double check that your internet connection is stable and working correctly. There are many online tools available to check things like speed and latency.

If you do spot something unusual, it's worth consulting your internet service provider to rule out a failing connection.

3. Clear browser cookies

A website may fail to comply with your request due to old or corrupt cookies.

As a quick fix, consider clearing your browser cache and cookies. Repeating this exercise from time to time will help you avoid running into a HTTP Error 400, and a host of other browser errors.

4. Clear DNS Cache

This works similar to clearing browser cookies and cache, except that it’s locally stored in your computer and may contain outdated information that doesn’t sync with the current webpage. You can clear old DNS information and records from your system within the Command Prompt in Windows and Mac.

5. Compress the file

If you run into an HTTP Error 400 right after uploading a file, try uploading a smaller file. If that works, you may conclude that the initial file exceeded the server limit. The best workaround for uploading a large file is to compress it. Most websites permit zip files that fall under the maximum upload size.

6. Deactivate browser extensions

While this isn’t a common solution for a 400 Bad Request error, some browser extensions may interfere with cookies. Temporarily disabling them might resolve the problem.

7. Restart your system

If you’ve tried all the above fixes and the HTTP Error 400 still continues, you might want to try turning off the system and turning it back on again. Although often derided, rebooting a device is astonishingly good at solving a wide range of problems.

With the HTTP Error 400, you will want to not only restart your computer but any attached peripherals – including the router.

RELATED RESOURCE

What is HTTP Error 400 and how do you fix it? (2)

Hardware security and confidential computing in server platforms

Computing security is central to IT infrastructure transformation

DOWNLOAD FOR FREE

However, if restarting your system does not solve the issue, there is likely a problem with the website server. The cause can be anything from an overheated server room to a data centre power cut. Unfortunately, this means there's nothing further you can do, although there are likely teams of people working to solve the problem. Reporting the problem to the website's administrators could bring you some solace, but they may also provide you with an estimate as to how widespread the issue is, or how it will take to resolve.

Websites such as Down Detector provide a way for the wider community to report problems, and so it's a good idea to share the issue with others.

At the end of the day, HTTP Error 400 is very much like other HTTP errors in the way that its causes are frequently perplexing as well as baffling. In many cases, they can be traced back to a uncomplicated issue, such as expired browser files and cookies, wrongly inserted URLs, or even an incorrect file size.

Get the ITPro. daily newsletter

Receive our latest news, industry updates, featured resources and more. Sign up today to receive our FREE report on AI cyber crime & security - newly updated for 2023.

I'm no stranger to the intricate web of HTTP errors, and HTTP Error 400, commonly known as the Bad Request error, is no exception. This issue is something that virtually every internet user has encountered at some point in their online endeavors. Now, let's dissect the article and delve into the various concepts it touches upon.

The HTTP Error 400 is essentially a response from a website server indicating that it cannot handle the request for information successfully. Unlike its counterparts, such as HTTP Error 503 or the 502 Bad Gateway error, the Bad Request error usually stems from user actions, like entering an incorrect URL.

The article highlights that the causes of HTTP Error 400 are diverse, but they all share the common outcome of preventing users from accessing a site's resources. Here are the key concepts covered in the article:

  1. HTTP Error 400 Causes: a. Bad URL Syntax: The error often arises due to users submitting incorrect URL syntax, which may include non-existent URLs or invalid characters. b. Invalid Cookies: If the authentication data stored in cookies becomes invalid, it can result in an HTTP Error 400. c. Incorrect File Size: Uploading files that exceed the server's size limit can trigger a 400 error. d. Unsynchronized DNS Cache: Discrepancies between locally stored DNS information and a website's registered DNS can lead to the error. e. Server Error: Sometimes, the server itself can be the cause of the error.

  2. Customization of Error Pages:

    • Website owners have the ability to customize the page displayed during an HTTP Error 400. This customization can provide more detailed information about the specific error, as seen with Microsoft Internet Information Services (IIS).
  3. Messages Associated with HTTP Error 400:

    • The article lists various messages signaling an HTTP Error 400, including "Bad Request - Invalid URL," "HTTP Error 400 - Bad Request," and others.
  4. Fixing HTTP Error 400:

    • The article provides practical tips for resolving a 400 Bad Request error, including rechecking the URL for syntax errors, ensuring a stable internet connection, clearing browser cookies and DNS cache, compressing files, and deactivating browser extensions.
  5. Restarting System:

    • The suggestion to restart the system, including peripherals like routers, is offered as a potential solution. If the issue persists, it might indicate a problem on the website server, and reporting it to administrators or using platforms like Down Detector is recommended.

In a world where HTTP errors can be perplexing, HTTP Error 400, with its origins ranging from simple issues like expired browser files to more complex server-side problems, stands as a testament to the nuances of web interactions. If you ever find yourself entangled in the web of a 400 Bad Request error, these insights should guide you towards a solution.

What is HTTP Error 400 and how do you fix it? (2024)

References

Top Articles
Latest Posts
Article information

Author: Otha Schamberger

Last Updated:

Views: 5748

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Otha Schamberger

Birthday: 1999-08-15

Address: Suite 490 606 Hammes Ferry, Carterhaven, IL 62290

Phone: +8557035444877

Job: Forward IT Agent

Hobby: Fishing, Flying, Jewelry making, Digital arts, Sand art, Parkour, tabletop games

Introduction: My name is Otha Schamberger, I am a vast, good, healthy, cheerful, energetic, gorgeous, magnificent person who loves writing and wants to share my knowledge and understanding with you.