How to set up a custom CDN hostname

Setting up a custom hostname with bunny.net

To achieve the best professional look for your website, you will want to use your own branded domain to serve your static content from a CDN. This usually looks something like cdn.yourdomain.com. Bunny.net provides an easy way to set this up in 4 simple steps.

Step 1: Register the hostname on bunny.net

First, open your Pull Zone details page and locate the Hostnames panel in the General section. Then enter the domain that you would like to use and click on the Add hostname button. The hostname will then appear in the Linked Hostnames list.

sBwyf3ajOn.png

Step 2: Locate and copy the CNAME record

Next, locate and select the CNAME record and copy it to your clipboard to use in step 3. It can be found right under the add hostname field.

mfn1ks3hoo.png

Step 3: Create a DNS CNAME record

Now it’s time to connect your custom domain to bunny.net by updating your DNS settings.

  1. Log in to the platform where you manage your domain name (this could be your web hosting provider, DNS manager, or registrar, such as Cloudflare, cPanel, Route 53, or others)

  2. Find the option to manage DNS or create DNS records.

  3. Create a new CNAME record:

  • Name: Enter the subdomain you chose earlier (for example, cdn if you’re using cdn.yourdomain.com).

  • Type: Select CNAME

  • Value/Points to: Paste the destination provided by bunny.net in Step 2 (something like yourzone.b-cdn.net)

  • TTL: Set this to 3600 seconds or lower to help ensure faster propagation and avoid DNS caching issues.

add_cname.png

Cloudflare:

a8ca1e5e-c497-459e-97a3-0afff32027eb.png

On Cloudflare and similar platforms, make sure the “Proxy” option (the orange cloud icon) is turned off. This feature can interfere with proper DNS resolution and prevent your custom domain from working correctly with bunny.net

 

Step 4: You're done

Just save the DNS record and that's it, you're done. Your domain will be linked to bunny.net as soon as your DNS provider updates the DNS record.

Table of Contents

Was this article helpful?
16 out of 25 found this helpful