BunnyCDN Support Hub

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

How to redirect your b-cdn.net hostname to your custom CDN hostname using edge rules

Edge rules allow you to easily redirect your b-cdn.net hostname to your custom hostname, making sure that your content will only be available on your own custom domain. This article will guide you on how to set it up in 5 easy steps.

edge_rules_redirect_b-cdn_to_custom_hostname.png

1. Open your pull zone details page and select Edge Rules in the side menu.

2. Select the Redirect To URL action.

3. In the trigger path field, enter your b-cdn.net hostname in the same pattern as illustrated in the screenshot above. For example *://ruletest.b-cdn.net/* where ruletest should be displayed with the name of your pull zone. 

4. Into the redirect URL, enter the custom URL that you would like to redirect to and append {{path}} to the end of it. In our example, this will be https://cdn.ruletest.com{{path}}. Make sure to use the correct http/https scheme depending on your hostname configuration. The {{path}} parameter will be automatically replaced with the correct URL path during the redirect.

5. Add the edge rule and you're all set.

0 Comments

Please sign in to leave a comment.