← Back

Custom Domain

💡
You can use custom domains to bypass ad blockers.
 

Requirements

 

Create a new Cloudflare Worker

1. Click on the Workers tab & Create a new worker

 
notion image

2. Copy and replace the code from https://github.com/splitbee/proxy/blob/main/index.js into the text area from cloudflare workers.

Name your worker that you can recognize it afterwards

notion image

3. Click on "Save and Deploy"

 
notion image
Your worker is now available under https://something.else.workers.dev

You can already use https://something.else.workers.dev/sb.js as a custom domain in your script.

Link your Cloudflare managed domain to the worker

After deploying the worker, you need to navigate to one domain of your choice managed by Cloudflare.

1. Choose the "Workers" tab in the menu

notion image
 

2. Press Add route

notion image

3. Add the domain followed by /* you want the worker to be available at. In this example we are using feedback.fish. Our route would be: hive.feedback.fish/*

Just select the previously generated worker in the dropdown

 
notion image

Last, we need to link the subdomain to a random ip. Navigate to DNS and create a new A record

notion image
 
Done! The new worker is available under hive.feedback.fish (not yours)

Use the custom domain in the script tag

Normally, you embed Splitbee as following

<script async src="https://cdn.splitbee.io/sb.js"></script>
 

If you want to use your custom domain, just replace the script with:

<script async src="https://something.else.workers.dev/sb.js"></script>
 

Feedback.fish example from above

<script async src="https://hive.feedback.fish/sb.js"></script>