Migrating from Netlify
Move a static site from Netlify to bunny.net, with its redirects and headers.
redirects and headers in orbitpush.json take the shape of [[redirects]] and [[headers]] in Netlify’s netlify.toml, written as JSON. Most Netlify sites move over without rewriting a rule.
1. Set up the site
export BUNNY_API_KEY=...
npx orbitpush init
Use your Netlify build’s publish directory as the build output directory.
2. Copy redirects and headers
Build the site first if your build copies _redirects or _headers into the output directory. Then run:
npx orbitpush migrate-netlify
It reads netlify.toml from the current directory and _redirects and _headers from the output directory, and writes their rules to orbitpush.json. It warns about every rule bunny.net can’t serve, such as rewrites or Language conditions. Those rules are still written, so the file stays a complete copy, and deploy skips them with a warning.
It never changes or deletes the Netlify files, so the site keeps working on Netlify while you move. After that, a change to a Netlify file does not reach orbitpush, and a change to orbitpush.json does not reach Netlify.
See orbitpush migrate-netlify for details.
3. Check what is supported
Most of Netlify’s redirects and headers work. The main differences:
- Rewrites and proxies (status
200) don’t work, except the SPA fallback/* /index.html 200, which turns on SPA mode. - Shadowing: every redirect behaves as forced, because edge rules run before the storage zone is asked.
- Pretty URLs:
/aboutredirects to/about/, but/about.htmlis not served at/about/. - Conditions: only
Countryis supported. - Status codes: bunny.net serves only
301and302.
The full feature tables are on the Redirects and Headers pages.
4. Deploy and switch DNS
npm run build
npx orbitpush deploy
Check the site on https://<name>.b-cdn.net, then add your domain and point its DNS at bunny.net.
Caching works the same way
Like Netlify, orbitpush sends Cache-Control: public, max-age=0, so browsers check for a new version on every visit, and the CDN cache is purged on every deploy. See Caching.
The way back
Each entry in redirects and headers is one [[redirects]] or [[headers]] block of netlify.toml with the same keys, so you can copy them back.