I am looking for a proper solution with steps to convert Images URL host to a custom subdomain name. What I want is
https://static.sitename.come/Fr4LGKEYBhCFAmxASjH9ng/<image_id>/<variant_name> this kind of url.
I have read some of the solutions listed on the platform but I am not sure how to change the Cloudflare default image delivery url to a Custom sub-domain url.
@ i40west You are the man who has done some worked around on those kind of changes. Could please guide me with the same
Any help would be appreciated.
You can use any domain that’s in your account, by adding
/cdn-cgi/images to the path, and you can create rules to rewrite the URLs if you want a different path. Documentation here:
I have read the document and your solution but it isn’t working for me.
Sharing you the steps that I followed:
A static subdomain added in DNS with type AAAA, name static and IPv4 address 100:: with the orange cloud turned on
Added redirect rules:
Open cloudflare image url in browser but it isn’t redirecting to the redirected rule.
Am I doing something wrong here? Please let me know.
Try changing your “URI Path” exclusion to just
imagedelivery. The idea is to exclude the
/cdn-cgi/imagedelivery requests, so the
.net shouldn’t be in there.
Ahhhh, it worked now after removing .net.
Now I am able to access the URL with the static subdomain but it does not exclude the
/cdn-cgi/imagedelivery path from the URL.
Is there any way to exclude that too
Thanks for your help
Do you mean, remove that part from the final URL? The Transform Rule example in the link I shared above has an example of doing that.
Yes. I did followed that Transform rule docs before and tried it but that didn’t worked out as the dynamic rules only works on Business or WAF plan .
Oh, the regex. Right. You may have to live with that URL path.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.