Cloudflare Images Custom Domains - BUG?
BUG ALERT 🪲
I see in the docs https://developers.cloudflare.com/images/cloudflare-images/serve-images/serve-images-custom-domains/ it says:
Serve images from custom domainsI have use cases that are failing with a
403
when using CF Images service via this URL format:
https://mycustom.domain/cdn-cgi/imagedelivery/Details: 1. I have my sites in pages. 2. I have a bunch of images stored in images. 3. I know the problem has to do with DNS (custom domains). 4 I have a 2 custom domains that this URL path works just fine
One of the two is a CNAME from another DNS provider. All good. One is CNAME flattening in the same CF account.4 It does not work 2 of the custom domains
Both DNS are managed in other cloudflare accounts with CNAME flattening and one example with subdomain CNAMEs pointing at the pages.dev project.5. If I use the pages.dev url of my pages projects all the images load just fine. 6. All the SSL certificates are setup, valid, enabled... Some custom domains working and other failing, but the most baffling part is the case where the subdomain managed in another DNS provider works. But those managed via other cloudflare accounts do not. Is this a 🐛 ❓
2 Replies
This is not a bug, you are only allowed to serve your own images via the custom domains. Which means the domain and images must be on the same account. The pages.dev urls should also only work for this if they are on the same account so if you can load cross account images with that then that specifically would be a bug.
The SSL for the custom domain is managed in my account.
Why does it work for DNS entries managed outside of Cloudflare?
It is the DNS that is managed elsewhere.
I would imagine that either both work (because the custom domain and SSL is managed in my account with the pages project and the images. Or neither of them should work. It should NOT be one of each.
Also, very important detail, there is a different between DNS management and the Custom Domains feature. The custom domains feature is a Pages / Workers feature to apply a custom domain to a pages project. In this case the custom domain and the images are both list in my account.