What Is a 414 Status Code?
The server is refusing to service the request because the request-target1 is longer than the server is willing to interpret.
This rare condition is only likely to occur when a client has improperly converted a POST request to a GET request with long query information, when the client has descended into a “black hole” of redirection (e.g., a redirected URI prefix that points to a suffix of itself) or when the server is under attack by a client attempting to exploit potential security holes.
A 414 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls2.
- 1 Content Negotiation RFC7230 Section 5.3
- 2 Calculating Heuristic Freshness RFC7234 Section 4.2.2]3
- Source: RFC7231 Section 6.5.12
414 CODE REFERENCES
Rails HTTP Status Symbol
Go HTTP Status Constant
Symfony HTTP Status Constant
Python2 HTTP Status Constant
Python3+ HTTP Status Constant
Python3.5+ HTTP Status Constant
When is a 414 status code used?
The 414 status code is used when there is a configuration issue. This error code means that the URL is too long for the server to process and the server expects a smaller HTTP path or address.
While there is no maximum length requirement, some browsers may limit the size of HTTP paths or addresses to prevent certain attacks.
Here are a few other instances when an HTTP 414 status code is used:
- Redirect loops that result in long URLs
- Server attacks
- POST request conversions to GET requests with query information that is too long
How to fix a 414 URI Too Large error
Here’s how to fix a 414 URI Too Large error in three steps:
1. Log in to your server
Before you can work on your server, you’ll need to log in and then figure out what type of server you have. If you already know your server type, you can move on to the next step.
Here are a few tips to identify your server type:
- Look for a “htaccess” file in the root of your server — if you see one, it means you have an Apache server
- Use the Whois Domain Tools site to determine your server type
- Ask your hosting provider
2. Find the server configuration file
You’ll need to dig deep into your advanced configuration settings to find a directory that contains all of your site’s files.
You’ll want to find your “etc” folder to find your configuration file. Depending on your server type, you’ll file will look like one of the following:
- Apache: /etc/apache2/apache2.conf
- Nginx: /etc/nginx/nginx.conf
3. Adjust the configuration file
Now that you’ve located your file, it’s time to adjust it to fix your HTTP 424 status code error.
First, you’ll need to open your configuration file in an editor. The next steps you take will differ depending on the server type you have.
For Apache servers, follow these steps:
- Look for the LimitRequestLine setting or add it to the bottom of your file if it’s not there
- Use at least 128000 for the value. If you need to go higher, keep the value to multiples of two
For Nginx servers, follow these steps:
- Look for the large_client_header_buffers settings. You’ll see two values relating to number and size.
- Now you can adjust the size. You can use 8K to 128K, and if you need to go bigger, keep it to a multiple of two
Once you’ve adjusted the size to the value you need, simply save your changes and upload your configuration file back to the server.
You can check your site again, and the 414 URI Too Long error should be gone.
- Learn about web development
- Learn about SEO
- Web development services from WebFX
- SEO services from WebFX
- MDN Web Docs
Marketing Tips for Niche Industries
- Trucking Website Design Services That Help You Grow Online
- Web Design for PPE Companies: 5 Sales-Boosting Design Tips
- Web Design for Exercise Equipment Companies: Browse Services & Get Tips
- Web Design for Storage Facilities: Launch a Revenue-Driving Site
- Web Design for Pressure Washing Companies
- Web Design for Restoration Companies (+4 Tips for Success)
- Web Design for Flooring Companies – WebFX Design Services
- Web Design for Biotech Companies: How to Design a Biotech Site
- Web Design for Window and Door Companies: Inspire Your Site