I recently had a requirement to use a CDN & found BunnyCDN to be the Best in regards to Performance, Price, etc.
That worked when I used it on my VPS Server but it couldn’t connect to my other server which was hosted on “Hostinger”.
I was using their “Cloud Global” plan because it had ‘Unlimited Bandwidth’ 🤭
every-time I’d try to connect to the CDN for a resource, it would throw a Error 502 (Unable to connect to Origin).
Hmmm… THAT.WAS.WEIRD! 🤨🧐
I tried a few other things but to no avail.
So I finally contacted the folks at Hostinger (their support is just 🔥)
They told me that they do not support BunnyCDN because it is a smaller CDN service compared to others (Hostinger uses Cloudflare & is their Partner too… so 😗) & said that their (BunnyCDN’s) IPs are frequently greylisted! 😮
Now the interesting thing is:
it is a CDN & therefore it has to send multiple requests to origin from multiple data centres (POPs) to get the resource if not cached already & because of that Hostinger’s Eng. Team flagged these IPs & therefore I couldn’t use BunnyCDN! ☹️
I was told to either use Cloudflare, some other CDN or buy a VPS Server… 😏
But I did manage to find a workaround! 🥳
So here it is:
• Go to your Dashboard (hPanel)
• Go to Domains > Cloudflare
• Enable Cloudflare
• Make SSL changes (if needed)
• Set the Security to OFF
• Hit SAVE.
For faster DNS propogation, follow below steps –
• Go to Advanced Tab
• Select DNS Zone Editor
• Set TTL for Cloudflare DNS to 60
• Hit SAVE.
Now add your Site / Origin to your BunnyCDN’s Pull Zone & it should work just fine… 😁🙌