BunnyCDN Support Hub

Guides, troubleshooting and support requests to help you get started with BunnyCDN.

How to set up a direct IP origin URL with a custom hostname using Edge Rules

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. 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.

origin-url-ip.png

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 Edge Rule with the host value

To send the correct host header, open the Edge Rules panel (1) for your pull zone. Next, add an edge rule with the action type Set Request Header (2). Set the trigger path to * (3), header name to Host (4) and Header value as the hostname (domain name) where your website is accessible (5).

edge-server-host-header.png

That's it. Click on the add edge rule button to add the new rule and you're all done. The only thing left to do is purge the cache if needed and your zone should now be connected to your server directly.

0 Comments

Please sign in to leave a comment.