How to Fix HTTP Error 431

The HTTP Error 431 is an error that your browser brings up when the server has refused to process your request because the HTTP headers are too long. Sometimes, you’ll see an additional description– Request Header Fields Too Large.

Whenever you get an HTTP error that begins with the number 4, it’s a sign that the error is not a server-side error; instead, it is caused by the client, meaning you can fix it. Below is a guide on the cause of and how to fix HTTP Error 431.

Understanding The Cause Of HTTP Error 431

To understand the cause of HTTP Error 431, you need to have a basic understanding of the communication between the client (you) and the server (the computer dedicated to serving you the website you want to visit).

The server never does anything automatically; all you see on a webpage is the result of a request-response cycle, i.e., the client makes a request to the server, and the server sends back a response.

For instance, each time you go to the web address https://clouddevelop.org/ on your browser, the browser sends a GET request to the server, which in turn responds with the website you see.

However, beneath the visible parts of the operation is an important part called a Header– every HTTP request and response contains a header. A request header is your web browser’s way of sending additional information to the server without needing your manual input.

Your browser can give the server information about the request, such as the Operating System, Browser, Request Type, Language, etc.

Request Headers of a website
Some Contents of a Request Header

It’s also important to know that HTTP requests are stateless; every request and response are independent of the other. So as not to make the user experience repetitive, web browsers store user data through various means, one of which is called a Cookie; these cookies are sorted and added to relevant requests by your browser. Sometimes, cookies can get corrupted or too large, which is one major cause of the HTTP Error 431. 

Fixes For HTTP Error 431

There are two ways you can fix the HTTP 431 Error:

1. Clearing Cookies

It’s important to note that what is known as a cookie is essentially a text file with small pieces of data. This file can get corrupted over time, or the text file gets too long for the server to process in a single request; the solution is to clear the cookies.

You can choose to either clear all cookies on your browser or the cookies for the specific website you’re having the HTTP Error 431.

Websites use cookies to save information such as usernames and passwords, so deleting them means affected pages might load slower the next time, and you would have to sign in afresh.

Of the options presented below, it’s better to clear the cookies for the specific site you’re having issues with and only clear all browser cookies if the first option doesn’t work.

Clearing Cookies For The Specific Website

  • Click the three dots at the top right of the Chrome window.
  • Select Settings.
  • Select Security and Privacy >> Cookies and other site data on the page that loads.
  • Scroll down and select See all cookies and site data.
  • On the next page, you’ll find a search bar at the top-right corner; type the website’s name you’re having issues with there.
  • Click the bin logo you find on the right side of the website name to delete the site cookies.
Fix HTTP Error 431 by clearing cache
How to Clear Site Cookie

Clearing All Your Browser Cookies

  • Click the three dots at the top right of the Chrome window.
  • Select More Tools and choose Clear browsing data from the list of options.
  • In the dialog box that appears, leave only the option labeled Cookies and other site data.
  • At the top, choose the time range within the first time you visited the website; if you can’t remember, select All time.
  • Click Clear data.
Screenshot of the Clear Cookie page on Google Chrome

Note: This is the process on Google Chrome browser, which is currently the most popular browser globally; however, the procedure is similar on other browsers.

2. Shorten The URL Parameters

URL parameters or query strings are a way to pass information about a click through the URL. The query string is anything after the question mark sign on your browser’s address bar.

With URL parameters, a developer can filter and organize content or track information on their website; for example, some ad services can use them to know which ad campaigns are most effective.

However, when these parameters get too long, it can sometimes lead to an HTTP Error 431. The temporary solution to this as a visitor is to click the address bar on your browser and clear everything written after the question mark.

If you’re a website owner that uses Google Analytics and you keep getting this complaint from visitors, you should customize your query using a tool called Campaign URL Builder. WordPress users can use the URL Params plugin to sort the issue out.

Leave a Comment