How To Fix HTTP Error 431

How To Fix HTTP Error 431


How To Fix HTTP Error 431

Did you just try to visit a website only to be met by the HTTP error 431 message? This video is for you 👀
👉 Subscribe: https://www.youtube.com/c/Kinsta?sub_…

HTTP status codes like the 431 error can be frustrating because they get in the way of the website that you want to interact with. Thankfully, though, the error code provides you with the information that you need to fix it in the form of those three numbers – 431.

In this video, you’ll learn what this specific error means and what some of the common causes are. Then, we’ll share four troubleshooting steps that you can follow to fix the problem, whether you’re experiencing it on someone else’s website or your own website.

ℹ️ About Kinsta

Kinsta is an award-winning Cloud Platform designed to host and manage your WordPress sites, Applications, and Databases faster and more efficiently. Trusted by 25,000+ companies worldwide, from developers, startups, and agencies, to multinational brands, we guarantee lighting-fast performance, enterprise-level security, ease of use, and exceptional support.

🚀 Try our flagship Managed WordPress Hosting plans and get $240/month worth of premium features included in every plan. That’s free unlimited migrations, 20% faster load times thanks to Google’s fastest servers and Premium Tier network backed by Cloudflare’s 275+ CDN locations worldwide, and 24/7/365 multilingual technical support from humans in less than 2 minutes.

👉 Try risk-free with our 30-day money-back guarantee Powerful Managed WordPress Hosting

👤Follow us:
https://kinsta.com/blog/
https://kinsta.com/newsletter/
https://twitter.com/kinsta
https://instagram.com/kinstahosting
https://facebook.com/kinstahosting

💡Discover all of our hosting solutions ► https://kinsta.com/



🕘Timestamps

0:00 Intro
1:04 What Is HTTP Error 431?
2:30 What Causes a 431 Request Header Fields Too Large Error?
4:08 Clear Your Cookies and Browser Cache
6:36 Shorten or Remove URL Query Parameters
7:15 Shorten/Edit Your Code
8:34 Adjust Cookie Settings



📚 Resources

⚒️ How To Fix HTTP Error 431 Request Header Fields Too Large
https://kinsta.com/knowledgebase/http

#HTTP431 #HTTPerror


Content

0.15 -> Hey guys, it's Alisha.
1.68 -> And today, I'm gonna show you how to fix HTTP error 431.
6.4 -> (upbeat music)
12.66 -> HTTP status codes like the 431 error can be frustrating
16.921 -> because they get in the way of the website
19.14 -> that you wanna interact with
20.64 -> or it's getting in the way
22.23 -> of your customers visiting your site.
24.99 -> Thankfully, the error code provides you
26.85 -> with the information that you need
28.35 -> to fix it in the form of those three numbers:
31.14 -> 4, 3, 1.
32.34 -> In this video, you'll learn what this specific error means
35.88 -> and what some of the common causes are.
38.58 -> Then, we'll share four troubleshooting steps
41.01 -> that you can follow to fix the problem,
43.05 -> whether you're experiencing it on someone else's website
45.75 -> or your own website.
47.16 -> Before we get too far,
48.72 -> I wanna let you know that there will be links
50.7 -> to more resources in the video's description.
53.1 -> And remember,
53.94 -> subscribe and ring that bell
55.74 -> to get notifications for future helpful content.
58.74 -> Now, what is the HTTP error 431?
67.77 -> Before we can talk about the HTTP error 431 specifically,
72.09 -> we first need to talk about what HTTP is
75.36 -> and where these errors come from.
77.16 -> There are tons of different status codes.
79.38 -> Some HTTP status codes indicate
81.96 -> that everything is functioning normally.
84.63 -> However, many HTTP status codes
87.33 -> indicate some type of error.
89.73 -> As you can probably guess,
91.02 -> the HTTP 431 message is one of the error codes.
95.4 -> The number 431 indicates the specific HTTP error
99.72 -> which is Request Header Fields Too Large.
103.11 -> Essentially, this means that the HTTP request
105.878 -> that your browser is making to the server is too large,
110.1 -> or another way of phrasing it
112.11 -> is that the request is too long.
115.62 -> This can happen because the total size
117.66 -> of the request headers is too large
119.91 -> or it can happen because a single header field is too large.
123.39 -> Because your browser is making a request
125.37 -> that is too large or long,
127.32 -> the server drops,
128.46 -> denies the request
129.749 -> instead of delivering the HTTP response
132.78 -> that your browser was expecting.
135.57 -> Because your browser doesn't receive the needed response,
138.57 -> it's unable to render the website
140.82 -> and shows the HTTP error 431 message instead.
149.836 -> In general, HTTP error codes can indicate a problem
153.75 -> in two different areas.
155.31 -> On the server side,
156.69 -> there's something going wrong in the web server
158.94 -> that's triggering the error code.
161.4 -> On the client side,
162.96 -> there's something going wrong in the web browser
165.27 -> that's triggering the error.
166.68 -> The HTTP error 431 is a client side HTTP error.
171.63 -> That means the cause of the problem
173.34 -> is somewhere in your web browser
175.5 -> because your web browser is the one making the request
178.32 -> with large headers.
180.15 -> That also means that you'll need to apply most fixes
182.88 -> by adjusting your web browser.
184.41 -> However, the root cause isn't always your browser's fault.
188.82 -> Sometimes the way the website is coded
191.19 -> can cause your browser to make large requests.
193.56 -> Typically, the HTTP error 431
196.08 -> is caused by issues with cookies,
198.3 -> long referral URLs,
200.22 -> or just the total size of the request headers.
202.74 -> If you're trying to visit someone else's website,
204.96 -> you can try to eliminate these causes
206.73 -> by adjusting your web browser.
208.74 -> If you have your own website,
210.36 -> and you're trying to diagnose
211.86 -> why your site's visitors are seeing the HTTP error 431,
215.91 -> you might need to dig into your site's code
218.04 -> to make it less likely to cause your sites visitors
220.8 -> to have large requests.
222.69 -> For example, you might need to adjust
224.94 -> how your site uses cookies in visitors' browsers
227.67 -> or configure your server to accept larger requests.
236.144 -> Now that you know what the HTTP error 431
239.34 -> Request Header Fields Too Large message means
242.43 -> and some of its causes,
244.41 -> let's get into how you can fix this error.
246.69 -> Pretty much all websites use cookies
248.82 -> to identify and store information about individual users.
252.54 -> For example, if you log into a website,
255.06 -> that website will use a cookie
256.65 -> to remember that you're logged in,
258.36 -> so that you don't need to log in again,
260.52 -> every single time you visit.
261.78 -> To learn more about cookies,
263.31 -> check out our guide to cookies and PHP sessions.
266.07 -> However, if there are too many cookies,
268.83 -> that can lead to large HTTP request headers,
271.65 -> which can trigger the HTTP error 431
274.56 -> Request Header Fields Too Large message.
276.69 -> One common fix, therefore,
278.4 -> is to clear the cookies for the site
280.929 -> where you're experiencing the issues.
284.07 -> Most popular browsers make this pretty easy to do.
286.98 -> Remember: if you clear your cookies,
289.17 -> you will be logged out of every website
291.63 -> for which you clear cookies.
293.67 -> If you clear all your browsers cookies
295.77 -> that means you'll be logged out of every single website.
298.65 -> For that reason,
299.82 -> we recommend starting with the targeted approach
302.7 -> of only clearing cookies for the specific site
305.91 -> where you're experiencing the problems.
308.28 -> If that doesn't work,
309.39 -> then you can try fully clearing your browser's cookies.
311.82 -> Here's how to clear browser cookies in Chrome.
314.28 -> Enter the following in your browser address bar.
318.42 -> Search for the URL of the site
320.52 -> where your experiencing issues.
323.19 -> Then click the trashcan icon to delete all of the cookies
326.64 -> and site data for that site.
328.26 -> This basic method should also work
330.179 -> for other Chromium-based web browsers,
332.73 -> such as Brave, Edge, Vivaldi, Opera, and others.
337.59 -> However, you'll need to go through the settings area
340.2 -> rather than pasting in the URL.
342.9 -> To clear cookies for a specific site in Safari,
345.66 -> follow these instructions.
347.34 -> Open the preferences area.
350.19 -> Select the privacy tab.
352.62 -> Click manage website data.
355.68 -> Search for and select the site
357.469 -> where you're experiencing issues.
360.096 -> And click the remove button
362.67 -> once you've selected the site.
364.53 -> To clear cookies for a specific site in Firefox,
368.04 -> follow these instructions.
369.51 -> Enter the following in your Firefox browser address bar.
374.07 -> Scroll down and find the cookies and site data section.
378.84 -> Click the manage data button in that section.
382.95 -> Search for and select the site
385.14 -> where you're experiencing issues.
387.48 -> Then click the remove selected button
390.27 -> once you've selected the site.
391.89 -> Trying to visit a site using URLs
394.32 -> with long query parameters
396.27 -> can also trigger the HTTP error 431.
400.08 -> Query parameters are the part of a URL
402.3 -> that comes after the main URL.
405.18 -> They're used to pass additional information to the server
408 -> but they aren't actually required to access the page
410.7 -> in most cases.
412.26 -> For example, many sites use UTM parameters
415.155 -> to track conversions.
416.657 -> Here's an example of a base URL
420.66 -> with some additional query parameters.
422.88 -> To see if this is the problem,
424.35 -> delete the question mark
425.88 -> and everything that comes after it.
428.13 -> Then, try revisiting the newly cleaned URL,
431.31 -> and see if the error disappears.
433.02 -> These next two tips won't help
434.788 -> if you're experiencing the error on someone else's website,
438.66 -> but if you're experiencing the error on your own site,
441.57 -> or if your visitors are complaining
443.37 -> of experiencing the error,
445.08 -> then these tips can help address the root cause.
447.24 -> The first option is to dig into your site's code,
450 -> and check if your code is generating large request headers,
454.35 -> that is, whether your code is forcing visitors' browsers
457.53 -> to send large requests.
459.3 -> These errors are specifically common
461.22 -> when working with JavaScript.
463.05 -> If you check out Stack Overflow,
465.15 -> you'll see that most of the people experiencing this error
467.94 -> are using technologies,
469.26 -> such as AngularJS, React, Node.js, and more.
474.6 -> For example, your Node.js app
476.76 -> could be asking for more information than is needed,
480.03 -> which is generating unnecessarily large request headers.
483.15 -> Similarly, remember that spaces in your code
486.18 -> count toward the size of the request,
488.536 -> so that can be another invisible source of large requests.
492.72 -> In some cases, you can also adjust the maximum request size
496.56 -> at the server level
497.73 -> by editing your service configuration code.
500.7 -> For example, if you're using React,
502.812 -> you can adjust the max header size
505.26 -> in the package.json file.
507.69 -> Look for this line of code.
508.92 -> Another way that your site could trigger the HTTP error 431
512.88 -> is the way in which it's using cookies.
516.42 -> For example, if you're setting lots of cookies
519.24 -> in users browsers
520.266 -> that could trigger the error.
522.87 -> This is one of the reasons why clearing a site's cookies
525.45 -> is one of the potential fixes.
527.07 -> To avoid this,
528.24 -> make sure that you're not setting too many cookies
530.73 -> by accident.
532.05 -> This will require digging into your site's code
535.02 -> or hiring an expert with the qualifications to do so.
539.79 -> Kinsta's WordPress hosting can speed up your website
542.67 -> by up to 200%,
544.8 -> and you'll get 24/7 support
546.75 -> from our expert WordPress engineers.
549.315 -> We offer two months free with any annual plan,
552.354 -> a 30 day money-back guarantee,
554.55 -> and unlimited free basic migrations from any host.
559.05 -> Head over to kinsta.com/plans to get started.
563.73 -> Thank you for watching.
565.11 -> If you found this video helpful,
566.58 -> please don't forget to like, subscribe,
569.43 -> and hit the notification bell
570.84 -> for more tutorials, explainers,
573.03 -> and helpful content like this.
574.867 -> (upbeat music)

Source: https://www.youtube.com/watch?v=ABvstLw7efA