How to Fix HTTP 406 Not Acceptable Error: Quick and Simple Solutions
Encountering an error message like “HTTP 406 Not Acceptable” can be frustrating, especially when you’re not sure what’s causing it. Whether you’re managing a website, using a web application, or just browsing, this error can disrupt your workflow.
The good news? It’s usually fixable.
In this guide, we’ll explain the HTTP 406 error, why it happens, and most importantly, how to fix it quickly. We’ll explore both client-side and server-side causes and provide actionable solutions that anyone can follow.
Chat with an engineer on WhatsApp within 15 minutes.
Let’s start by understanding the basics of HTTP status codes and the role they play in web communication.
What is an HTTP Status Code?
HTTP status codes are three-digit messages that a server sends in response to a client’s request. These codes let your browser know if the request was successful or if something went wrong.
Every HTTP response status code a server sends falls into one of five standard categories. These codes are used to indicate the result of a client’s request and help in identifying issues like misconfigurations, unexpected database changes, or routing problems. Here’s a breakdown of the five classes:
1xx: Informational
These codes indicate that the request has been received and the server is continuing to process it. They are not typically shown to users but are useful during protocol-level communication.
2xx: Success
This class signifies that the request was successfully received, understood, and accepted. A proper response from the server typically falls under this category, such as 200 OK.
3xx: Redirection
These codes tell the client that further action is needed to complete the request, such as redirecting to a previous version of a URL or another location.
4xx: Client Errors
Considered client error responses, these occur when the problem lies with the request sent by the client. Errors like 404 Not Found and 406 Not Acceptable fall into this class. They often involve invalid headers, malformed requests, or even changes to database records made through a content management system.
5xx: Server Errors
Considered server error responses, these indicate that the request was valid, but an error occurred on the server while processing it. These may point to issues such as misconfigured applications, failures in server-side logs, or even HTTP errors resulting from system overload or poor code execution.
The 406 Not Acceptable error is part of the 4xx group, which indicates a problem with the request sent by the client (usually your browser or app).
Learn more about: How to Fix Connection Timed Out Error in WordPress
Stuck with an HTTP Error like 406 or 405?
Our Emergency WordPress Support team is available to troubleshoot and resolve urgent issues fast.
What is the HTTP 406 Not Acceptable Error?
The HTTP 406 Not Acceptable error occurs when the server is unable to return a response in the format requested by the client.
In simpler terms, your browser asks for a specific type of data (like HTML, JSON, or XML), but the server can’t provide it in that format. As a result, it returns a 406 error. Key points of this error are:
- It’s a client-side error, but server misconfigurations can also trigger it.
- The root cause often lies in request headers, especially the Accept header.
- Fixing it usually involves adjusting headers, server settings, or troubleshooting plugins.
Let’s dive deeper into the causes and how to resolve them.
Quick Ways to Fix it: How to Fix a 400 Bad Request Error
Role of Request Headers in the 406 Error
The request header, especially the Accept header, is the most important element in diagnosing a 406 error. Let’s examine how it works.
What is the Accept Header?
When a browser requests a page, it sends headers that tell the server what formats it can accept. For example:
Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8
This tells the server it prefers HTML but can handle other formats too.
Why Does it Trigger a 406?
If the server doesn’t support any of the requested formats or it’s restricted from serving them, it will return a 406 error. This often happens when:
- The Accept header is too specific
- The server doesn’t recognize the formats
- A security module blocks non-standard headers
Actionable Troubleshooting Tips: How to Fix Database Errors in WordPress
How the Requested URL Affects the Error?
Sometimes, the problem isn’t in the headers but in the URL itself. Possible URL issues include:
- The URL points to a non-existent file or resource
- The resource is restricted or not accessible due to permissions
- The server rules (like .htaccess in Apache) block specific types of requests
How to troubleshoot this issue:
- Double-check the URL for typos
- Try accessing the URL from another browser or device
- Check if the resource exists on the server
If changing the URL resolves the issue, it may have been a routing or permissions problem.
Check out: How to Resolve 500 Internal Server Error in WordPress
Common Client-Side Causes of 406 Errors
Even though the 406 Not Acceptable error is triggered by the server, the root cause often lies on the client side. Several issues from the user’s end can lead to this error. Below are the most common client-side causes:
- Improper Request Headers: When the client sends overly strict or incorrect Accept or Accept-Language headers, the server may be unable to match them with a suitable response format.
- Browser or User-Agent Issues: Misconfigured browsers or outdated user agents may send malformed or unsupported headers that the server cannot process correctly.
- Faulty Browser Extensions or Plugins: Some extensions, such as ad blockers or privacy tools, modify request headers or block certain content types, which can result in a 406 error.
- Misconfigured CMS or Theme: Content management systems (CMS) or themes might inject non-standard headers or modify default settings, interfering with content negotiation between client and server.
- Corrupt Cookies or Cache: Stored cookies or cached data may conflict with current request headers or introduce inconsistencies that trigger a 406 response.
Recovery Steps: WordPress Emergency Service to Handle a WordPress Site Crash
Client-Side Fixes for HTTP 406 Not Acceptable Error
If you’re encountering the 406 Not Acceptable error, the problem might be rooted in your browser or local settings. Try these client-side solutions to troubleshoot and resolve the issue:
Clear Browser Cache and Cookies
Over time, your browser stores cached data and cookies to speed up loading. However, outdated or corrupted cookies can send incorrect headers to the server, triggering a 406 error. So, start by clearing your browser’s cache and cookies. Then, reload the page. You can also try opening the site in incognito or private mode to rule out session-related issues.
Disable Browser Extensions
Some browser extensions, especially ad blockers, VPNs, and privacy-focused plugins, can modify request headers or block content, causing conflicts with the server. As such, temporarily disable all extensions and refresh the page. If the site loads correctly, re-enable extensions one at a time to find the culprit.
Switch to Another Browser
Different browsers handle requests differently. If the error persists in your current browser, try opening the same URL in another browser like Chrome, Firefox, Edge, or Safari. If the error disappears, the original browser may have configuration issues or unsupported features.
Review Custom Headers
For developers and tech-savvy users, it’s worth inspecting the HTTP request headers being sent. You can analyze them using browser developer tools (Network tab) or tools like Postman. Check the Accept and Accept-Language headers for overly specific values. Loosening the header values may allow the server to respond with a compatible format.
Update Your Browser
An outdated browser may lack support for newer content types or send legacy headers that the server doesn’t recognize. Hence, always ensure your browser is updated to the latest version to maintain compatibility and security.
Learn more: How to Fix HTTP 429 Too Many Requests Error
Server-Side Causes of 406 Error Messages
While the 406 error is categorized as a client-side issue, sometimes the server configuration is to blame.
Here’s why you might get a server error response:
- Improper Content Negotiation: Servers perform content negotiation to determine the best response format. If this negotiation fails, because the server doesn’t support the format the client requested, it results in a 406.
- Incorrect MIME Types: The request can’t be completed if your server doesn’t support or mislabels the requested MIME type (like application/json or text/html).
- Security Modules (like Mod_Security): Many hosting environments use tools like Mod_Security for added protection. These modules can block requests with certain headers or content types, triggering a 406.
- File or Directory Permissions: Access restrictions or improper file permissions on the server can block delivery of the requested content.
- Issues in Application Code: Some frameworks and applications handle content negotiation manually. Poorly written code or misconfigured APIs can send conflicting responses.
Which is Better: Unlimited WordPress Support vs Pay-Per-Incident
Server-Side Fixes for HTTP 406 Error Message
If client-side troubleshooting doesn’t resolve the 406 error, the issue may be coming from the server. Server-side configurations often play a critical role in how requests are processed and responses are delivered. Here are the most effective server-side fixes to resolve a 406 Not Acceptable error:
Check Server Logs
Start by reviewing your server logs. They often contain valuable details about the rejected request. Look for entries that indicate blocked content types, denied formats, or failed content negotiation attempts. These logs can point you toward the specific issue, whether it’s a misconfiguration, a security filter, or a missing file type.
Modify Mod_Security Rules
If your server uses Apache with Mod_Security, it might be blocking certain request headers or content types. Therefore, temporarily disabling Mod_Security can help determine if it’s the cause. Once confirmed, you can adjust the ruleset to allow valid requests while still maintaining security.
Adjust MIME Types
Make sure your server recognizes and supports the MIME types requested by the client. For example, if a client expects application/json but the server doesn’t support it, a 406 error can occur. Properly define or register MIME types for the content your application delivers.
Fix File Permissions
Incorrect file or directory permissions can prevent the server from accessing and serving content, leading to failed content negotiation. Ensure that public-facing files and folders have appropriate read permissions and that access isn’t restricted by server rules.
Configure Content Negotiation
On servers like Apache, make sure content negotiation is set up correctly using directives like AddType or AddHandler. For Nginx, verify that Content-Type headers are being sent accurately and align with the client’s expectations. A mismatch can trigger a 406 error.
Implement Fallback Responses
If your application supports multiple content formats (like HTML, JSON, XML), implement a fallback mechanism. If the client’s preferred format isn’t available, your app should default to a standard format rather than returning a 406 error.
Update CMS Plugins or Extensions
If your website runs on a CMS like WordPress, Drupal, or Joomla, third-party plugins or extensions could be modifying HTTP headers. Update all extensions, and disable any that may be altering response formats or interfering with content negotiation.
Find out: Key Signs Your Website Needs On Demand WordPress Support Services
Final Tips for Developers
For web developers and technical users, diagnosing and fixing the 406 Not Acceptable error requires a hands-on approach. By using the right tools and monitoring techniques, you can pinpoint the issue quickly and ensure that your server responds appropriately to client requests.
- Use Testing Tools: Leverage tools such as Postman or cURL to manually test how your server responds to different request headers. This helps you simulate real-world scenarios and fine-tune your content negotiation settings.
- Validate Server Content Types and Headers: Use browser developer tools (Network tab) to inspect the Content-Type and Accept headers exchanged during requests. Make sure the server is returning formats that match the client’s expectations.
- Enable and Monitor Detailed Logging: Always enable detailed error logging on your server. Logs help track down the exact moment and cause of a 406 error, allowing you to troubleshoot and resolve issues efficiently.
Scaling Client Support: How to Provide Prompt and Effective WordPress Maintenance Services
Best Practices for Error Handling
Even when a request can’t be processed exactly as requested, your server should still respond in a way that’s informative and user-friendly. Poorly handled errors can frustrate users, affect site credibility, and even hurt your SEO. That’s why having solid error-handling practices in place is essential.
Here are a few best practices to follow when dealing with the HTTP 406 Not Acceptable error or any other server response issue:
Return a User-Friendly Error Page
Instead of a blank or technical error message, serve a custom error page that clearly explains what went wrong in simple terms. This helps users understand the issue and often guides them to next steps, like returning to the homepage or contacting support.
Need Help Creating a Custom Error Page?
A professionally designed custom error page not only improves user experience but also protects your SEO performance.
Provide Alternate Content Types
If the client’s preferred content type isn’t available, the server should try to respond with a more commonly supported format (like plain HTML or JSON). By offering fallback options, you reduce the chance of a failed request and improve the user experience.
Log All 406 Errors
Detailed logging is key to proactive error management. By tracking when and how 406 errors occur, you can identify patterns, such as certain browsers or user-agents triggering the error, and fix root causes before they affect more users.
Maintain SEO Integrity
Search engines also encounter your server’s responses. A poorly handled 406 error can affect your crawlability and indexing. By delivering clean, informative, and standards-compliant error pages, you help search bots understand your site better and maintain good SEO health.
Read: Top Proactive WordPress Maintenance Strategies to Prevent Downtime
To Sum Up
The HTTP 406 Not Acceptable error may seem technical, but it’s usually straightforward to fix once you know where to look. Most of the time, the issue lies in headers, browser settings, or server configuration.
By understanding how content negotiation works and how headers impact responses, you can diagnose the problem with ease.
Whether you’re a developer, a website owner, or an SEO professional, following the steps in this guide can help you eliminate the error quickly.
Remember: Test systematically, rule out both client and server issues, and always monitor your server logs.
Still getting a 406 error on your WordPress site? Contact us for advanced and emergency support.
FAQs About HTTP 406 Error
How do I resolve a 406 Not Acceptable error?
The HTTP 406 Not Acceptable error is a client error response code that occurs when the web server cannot return a response that matches the acceptable values defined in the request headers, most often the Accept or Accept-Language headers. To resolve this, check and adjust the request headers, clear browser cache, and disable faulty plugins or extensions. On the server side, ensure proper content negotiation is configured and that the requested resource is available in a supported format.
How do I bypass error code 406?
To bypass a 406 error, use a browser or tool that sends more general headers with acceptable values like Accept: */*. Developers working in a web application can configure fallback formats to ensure an acceptable response is always delivered. It’s also helpful to double-check the web server settings and disable security modules like Mod_Security temporarily for testing.
What is error code 406: Booking Not Acceptable?
This error message typically appears in web applications such as booking systems when the server fails to deliver an appropriate representation of the requested resource. It often stems from strict header requirements, faulty plugins, or issues within the content management system (CMS) being used. Updating the CMS or reverting recent database record changes can help.
How do I fix the HTTP 405 Method Not Allowed error?
The HTTP 405 error is also a client error response that occurs when the server recognizes the URL but not the HTTP method used (e.g., POST, GET). To fix it, check server configuration files, routes, or PHP code. Ensure that your CMS dashboard or framework allows the method you’re trying to use.
Is the 406 error a server or client issue?
Though the 406 error is a client-side status code, it is often caused by server-side issues such as misconfigured MIME types, restrictive request headers, or security modules. Sometimes, even the base CMS or hosting account settings can contribute. Proper logging and testing with tools like Postman can help isolate the cause.
Is Your Website Fast & Secure?
Run an instant scan for security vulnerabilities, bloated plugins, and TTFB latency.
Need Help Securing or Speeding Up Your Site?
Get 24/7 proactive security WAF, daily cloud backups, and sub-second speed optimization from ₹3,470/mo.