Custom domains
Put your site on your own domain with a free SSL certificate, and redirect other hostnames to it.
Every site is available at https://<name>.b-cdn.net. To serve it on your own domain, add the domain with orbitpush domains add. It adds the hostname to the pull zone, tells you which DNS record to create, waits for it, then gets a free SSL certificate and turns on HTTPS.
Add your domain
npx orbitpush domains add www.example.com
orbitpush prints the DNS record to create at your DNS provider:
www.example.com CNAME my-site.b-cdn.net
At the root of a domain, such as example.com, most DNS providers don’t allow a CNAME. Use an ALIAS or ANAME record, or CNAME flattening, instead.
orbitpush then checks the record every 10 seconds, for up to 15 minutes. Once the record points to bunny.net, it gets the certificate and turns on HTTPS:
✔ www.example.com is connected: https://www.example.com
If DNS takes longer, or you stop it with Ctrl+C, run the same command again later. It continues where it stopped.
If your domain uses a proxy, such as Cloudflare’s orange cloud, turn it off for this record. Otherwise the record never resolves to bunny.net, and the domain does not connect.
The first domain you add becomes the primary domain: the domain field in orbitpush.json. Commit the updated file.
Redirect other hostnames
Every domain added after the first one is an alias. It needs the same DNS record, and it redirects every path and query with status 301 to the primary domain:
npx orbitpush domains add example.com
https://example.com/a?b=1 then goes to https://www.example.com/a?b=1. You can have up to 8 aliases, because bunny.net allows 10 hostnames per pull zone, <name>.b-cdn.net and the primary domain included.
Switch the primary domain
npx orbitpush domains add example.com --primary
The domain becomes primary only once it is connected, and the former primary domain becomes an alias that redirects to it. Until then it stays an alias, so visitors are never sent to a domain without HTTPS. Aliases redirect only once domain has a certificate. Until then they serve the site themselves.
When the domains swap, the old alias redirect is deleted before the new one is added, so the two never redirect in a loop. Swapping domain and the alias in orbitpush.json and deploying does the same.
Search engines
While domain is set, responses on <name>.b-cdn.net carry X-Robots-Tag: noindex, so search engines index your domain instead of the bunny.net hostname.
Check the status
npx orbitpush domains list
It shows each domain, whether it is connected, and the DNS record it still needs. It changes nothing.
Remove a domain
npx orbitpush domains remove example.com
This removes the hostname from orbitpush.json and from the pull zone. A primary domain that still has aliases cannot be removed: remove the aliases first, or make another domain primary.
DNS records are not managed by orbitpush. Remove them at your DNS provider.
Deleting a domain from
orbitpush.jsonby hand does not remove it from bunny.net. It keeps serving the site without a redirect, anddeploywarns about it. Useorbitpush domains remove, ororbitpush deploy --prune-hostnamesto remove every hostname the file does not list.
Domains in CI
Without a terminal, domains add checks DNS once instead of waiting, and exits with status 1 while the domain is not connected. Run it again a few minutes later. domains list also exits with 1 while any domain is not connected, so a script can poll it.
See orbitpush domains for the full reference.