HTTP status codes are numbers that represent the statuses of particular requests. These messages help identify whether a request was successful, redirected, or had an error. You’ll likely run across these codes while working on your website, including HTTP 416.
Status codes that fall into the HTTP 400 category typically indicate a bad request that could not be completed. If you run into the HTTP 416 error, don’t panic. The good news is that you can take steps to resolve it.
In this post, we’ll explain the HTTP 416 status code and some common causes of the error. Then we’ll explain how to troubleshoot and fix the issue. Let’s jump in!
Check Out Our Video Guide to Fixing the HTTP 416 Error
What the HTTP 416 Status Code Means
The HyperText Transfer Protocol (HTTP) 416 status code is also known as “Range Not Satisfiable”. This message means that the request you made can’t be fulfilled. More specifically, it indicates that your request was for a portion of a resource that the server couldn’t return.
You’ll usually see this status code because the server doesn’t have the specific resource you’re asking for. For example, if you try to access a page that doesn’t exist, you may see a 416 error.
HTTP status codes help identify whether a request was successful, redirected, or had an error. 👀 So what to do when you see HTTP 416? 😅 Read on…Click to Tweet
Common Causes of the HTTP 416 Error
There are a few different reasons that this error can happen. For instance, you’ll see HTTP 416 if the server doesn’t have the specific resource you’re asking for. Alternatively, the server could be temporarily down or unavailable.
Typically, the document or page doesn’t contain the indicated request ranges. Alternatively, the value of the range header (the part that the server should return) doesn’t make sense.
For instance, let’s say you have an image 1,000 bytes in size. If your server specifies the wrong value, such as 1,500, then the browser will send a request for 1,500 bytes from the server. Your server may return an HTTP 416 error in this scenario because the image is only 1,000 bytes.
It’s also possible that the server is configured to only serve certain types of resources. If you see the HTTP 416 error, it may mean that the resource you’re trying to access isn’t one of the server-supported types.
Finally, you might see the HTTP 417 error if you’ve made too many requests in a short period. When this happens, your Internet Protocol (IP) address may be temporarily blocked.
Troubleshooting and Locating the HTTP 416 Error
When faced with the 416 response message, you’ll likely want to determine which part of the range is unsatisfactory. This message usually will include a Content-Range that will indicate this information.
It will be marked by an asterisk symbol (*), followed by a forward slash (/). Then it will contain the current length of the resource. For example, it may look like the following:
Content-Range: bytes */12777</code.
How To Fix the HTTP 416 Error (4 Potential Solutions)
Now that we understand more about this HTTP status error and some common causes, let’s discuss how you can resolve it. Below are four potential solutions for fixing the HTTP 416 error!
1. Clear Your Browser Cache and Revisit the URL
The first thing you should do when trying to resolve the HTTP 416 error is to clear your browser cache. The process for doing this will depend on the browser you’re using.
For example, if you’re using Google Chrome, you can click on the three vertical dots in the top right-hand corner of the screen, then select More tools > Clear browsing data:
Make sure there is a checked box next to Cached images and files. Then, click on Clear data:
Once you’ve cleared your cache, refresh your browser. Then revisit the page to see whether the error message is still present. It’s also a good idea to double-check the URL you’re trying to access to ensure that it’s spelled correctly without extra spaces or characters.
2. Check the Apache Error Log
Another step you can take to resolve the HTTP 416 error is to check the error log. If you have an Apache server, you can access its log by using Secure Shell Access (SSH) and running the following command:
sudo tail -100 /etc/httpd/logs/access_log
Once you have the error log opened, you can search for 416. Finding it can help you further narrow down which page resulted in the status code. Then, you can take the troubleshooting process further from there.
3. Use an Application Performance Monitoring (APM) Tool
Furthermore, APM tools can help you locate and resolve the HTTP 416 error. These tools can monitor the performance of your website and applications to gain deeper insights and understanding of issues as they arise.
For instance, at Kinsta, we use Nginx and Kinsta APM for all of our plan tiers:
Along with DevKinsta, this APM free tool is accessible directly from your MyKinsta dashboard. It enables you to diagnose performance issues and quickly identify their sources.
4. Disable Range Requesting
At this point, if you’re still seeing the HTTP 416 error, the best solution may be to disable range requesting. This will tell browsers they can’t use the Range request header to request byte ranges from files.
To disable range requesting, you can add the following code to the top of your .htaccess file:
Header set Accept-Ranges none Request
Header unset Range
When you’re done, save your file. Then refresh your browser to reassess the webpage resulting in the HTTP 416 status error code. If this still hasn’t fixed the problem, we recommend reaching out to your hosting provider for further assistance.
If you run into the HTTP 416 error, don’t panic. 😅 The good news is that you can take steps to resolve it with a little help from this guide ✅Click to Tweet
Summary
Running into error messages when you’re trying to access a website can be incredibly frustrating. One of the HTTP status codes that you may encounter is HTTP 416. This message usually means that the request you made can’t be fulfilled, which could be due to several reasons.
As we discussed in this post, there are four potential solutions you can use to fix the HTTP 416 error:
- Clear your browser cache and try revisiting the page resulting in the error.
- Check your error logs.
- Use an Application Performance Monitoring (APM) tool.
- Disable range requesting from your .htaccess file.
Do you want to switch to web hosting that includes an APM tool for easier error detection and resolution? Check out our Kinsta hosting plans to learn more!
Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:
- Easy setup and management in the MyKinsta dashboard
- 24/7 expert support
- The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
- An enterprise-level Cloudflare integration for speed and security
- Global audience reach with up to 35 data centers and 275 PoPs worldwide
Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.
Context: I am using a software package called Social Engine. It is extremely buggy.
Anyway, I asked (paid even) the Social Engine people to do an upgrade and when they finally did so, I logged into the site and noticed that the styles were all missing. I opened a support ticket and all they told me was that it was a 416 error and to contact my ISP.
This error was found by testing the direct link to the CSS files which are located in a writable folder in the software.
http://ministersdev3.themonastery.org/application/css.php?request=application/themes/monastery-theme/theme.css&c=6
I started doing my research only to find it’s an extremely rare error and I couldn’t see any suggestions for turning range requesting off on my Ubuntu 10.10 Linode server (running latest Apache and PHP5 with APC extension installed). Perhaps it’s a software issue? Someway the caching with APC is working? I reset the caching in this software to 60 seconds and made sure it was using APC. Still no dice.
Is it something their software may be doing that I would need to look into patching?
cmbuckley
38.8k8 gold badges77 silver badges91 bronze badges
asked May 5, 2011 at 0:38
1
The issue could be due to your browser having cached the original CSS files and trying to request byte ranges of the new files. See for example this bug with Chrome.
As far as disabling range requesting, it might not be necessary if you clear your browser cache, but if you need it you could try the following Apache config:
Header unset Accept-Ranges
This will tell clients that they cannot use the Range
request header to request byte ranges of your files.
answered May 5, 2011 at 13:52
cmbuckleycmbuckley
38.8k8 gold badges77 silver badges91 bronze badges
0
I have, at the top of my .htaccess file
Header set Accept-Ranges none
RequestHeader unset Range
hope this helps.
answered May 9, 2014 at 3:44
Xman ClassicalXman Classical
5,0691 gold badge25 silver badges26 bronze badges
Intercept the headers coming back from your ISP and verify that you’re getting a 416 status code. If so, intercept the headers you are sending to your ISP and drop the range header; this should force the server to send you the entire file.
answered Nov 9, 2011 at 18:21
james.garrissjames.garriss
12.7k6 gold badges82 silver badges95 bronze badges
One of my visitors from my website informed me that every so often (quite rarely actually), when trying to visit my website, he gets a 416 Error: Requested Range Not Satisfiable
I’ve never heard of such an error, and don’t see anything strange anywhere on my apache logs.
What can cause such an error?
My website is a wordpress blog, running on apache, centos.
asked Jul 22, 2011 at 19:45
0
That error means that some client sends a request to your server which specifies a range of bytes which is not serveable due to some reason.
This can happen with something like this example:
- You have an image with physical size 1000 bytes
- Your Server specifies the wrong content length e.g. 1500
- The client sends a request to get 0 — 1500 bytes from your server
- Your server sends a 416 because the image has only 1000bytes
answered Jul 22, 2011 at 19:49
1
This has been covered on Stack Overflow: 416 Requested Range Not Satisfiable
Check the error log for the 416 error. [I know you said you checked. It should be there unless you are including a resource from another server.] That should tell you what file. Then make sure it is getting cached correctly [or not cached at all].
UPDATE:
What you can do with APC, is disable caching of certain files by using the apc.filters
setting in your php.ini
[or apc.inc
or however you are including the apc config.] If you can figure out which file[s] are throwing the 416 error, you can start by configuring APC to not cache them. Sounds like a reasonable start to me.
Actually, come to think of it, if you can find the file throwing the error, you can use APC to, 1, see if it is cached; and 2, check on the file size that APC thinks it is; then 3, check the actual size on disk. Check out this link: devzone.zend.com/article/12618 [the official APC docs kinda suck]
answered Jul 22, 2011 at 19:52
3
416 — Requested Range Not Satisfiable
A 416 status code indicates that the server was unable to fulfill the request. This may be, for example, because the client asked for the 800th-900th bytes of a document, but the document was only 200 bytes long.
What causes this error in your case is hard to tell. I would start with the Apache error.log
and scan for 416. This way you might be able to narrow it down further to what page was called and go from there.
answered Jul 22, 2011 at 19:49
1