Skip to content

Custom Domains

Terminal window
pnpm run update -- --domain # API Worker
pnpm run update -- --admin-domain # Admin Worker

--domain configures the API Worker’s domain. Afterwards, review the Better Auth URL, since sessions depend on the authentication origin:

Terminal window
pnpm run update -- --auth

--admin-domain configures the Admin Worker’s domain and refreshes the admin URL configuration.

Only one configuration flag can be given per run.

If you also change a Worker’s *.workers.dev name, use pnpm run rename-worker; see the CLI reference.

Remember to add any new origin of your website to CORS_ORIGINS: see Authentication and CORS.