How to redirect your hostname to your custom CDN hostname using edge rules

Edge rules allow you to easily redirect your hostname to your custom hostname, making sure that your content will only be available on your own custom domain.

We will guide you on how to set it up in just a few easy steps:

1. First, open your pull zone details page and select Edge Rules in the side menu.

2. Click the Add New Rule button, which will open the Add Edge Rule page.

3. On the Add Edge Rule page, select the Redirect To URL action.

4. Enter the custom URL and append {{path}} to the end of it under the Redirect URL field. In our example, this will be{{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. Next, you need to add a trigger condition, so select Request URL for the condition type and make sure Match Any is selected. Next, add the trigger that will fire the edge rule, for example *://* where test should be replaced with the name of your pull zone. 

7. Click Save Edge Rule and you're all set.



Table of Contents

Was this article helpful?
43 out of 49 found this helpful