For Workers & Pages, what is the name of the domain?
What is the error number?
9408
What is the error message?
ERROR 9408: Could not fetch the image — the server returned HTTP error 403 Forbidden
What is the issue or error you’re encountering
I am having issue fetching URL-transformed images as they all returned 403 Forbidden. It is an error served by the server and not Cloudflare, however nothing I’ve done seems to remedy the issue.
What steps have you taken to resolve the issue?
I have checked various logs on both my host (Hostinger) and Cloudflare, neither of which seem to indicate an issue. I attempted to turn off various different security settings to no avail, as well as clearing the website’s cache, my browser’s cache, and testing in different browsers. I have attempted to change .htaccess configurations as well as outright deleting the file, but it didn’t do anything. There does not seem to be any IP address blocking. I have also double checked my DNS.
What are the steps to reproduce the issue?
I changed my nameservers back to Cloudflare and after a couple of days I attempted to implement URL image transforming, to which I was met by 403 Forbidden errors.
In an attempt to find out what the issue was, I saw it mentioned a few times in various places that if it was a white on black error and not one with the Cloudflare branding, that it was served by the server. This is the case for my issue.
Ok, so it seems pretty clear this is a server issue. In which case, you’ll need to get help from your host to figure out why it’s returning 403s for the Image Resizer requesting those source images.
After discussing with my host (Hostinger), it would seem that they are automatically blocking requests from the IP address 2a06:98c0:3600::103, which appears to be associated with the worker that is querying the transformations. I will reach out to see if there is a way for this block to be lifted, however throwing the IP into my allowlist does not seem to be changing anything.
For those who may end up on this thread searching for answers, if you are using Hostinger and using Cloudflare for this particular use-case, this particular worker IP is blocklisted by the host and they will not lift this block for you. If you cannot use a different CDN, you need to use a different host.