This article explains two easy steps to connect your pull zone to your server IP directly, bypassing firewall services such as CloudFlare which can block our servers from accessing your data.
1. Update your origin IP
The first thing we need to do is set the origin URL to point directly to your server's IP. You can do this by either creating a new pull zone or updating the existing one. Then please go to General > Origin. Make sure that the correct scheme (HTTP or HTTPS) is selected in order to prevent any redirects and if enabled, make sure to disable the Forward Host Header feature.
This will now make your pull zone connect to your server directly, however the server will return the default website on that IP. To get content from your actual website, we have to configure BunnyCDN to send the correct hostname back to your origin server, which we will do in step 2.
2. Add the custom hostname to the zone
We need to configure BunnyCDN to accept connections from your clients using the custom domain. To do this, first navigate to the General > Hostnames panel, and then enter your domain name into the Add a custom hostname section and click "Add Hostname".
Scroll down the page, and setup the Condition Matching as below:
Afterwards, you need to go to your DNS provider and change the record so that is a CNAME that points to the BunnyCDN pull zone (bunnynet-zone.b-cdn.net in below example). Also, once it’s done, you can straight away click Verify & Activate SSL to get the free Let’s Encrypt SSL certificate linked to your new custom hostname or skip that verification and do it later.
If you skip the SSL verification, you can enable the SSL by scrolling down into the Linked Hostnames and clicking the "Enable" button next to the new hostname you added. It will let you activate a free SSL certificate from here or upload your own SSL certificate.
The only thing left to do is purge the cache if needed and your zone should now be connected to your server directly, serving from your own custom hostname.