# A real address (custom domains)

- Buy the domain at Cloudflare Registrar or move its nameservers to Cloudflare. Then in `wrangler.jsonc`:

```jsonc
"routes": [{ "pattern": "myapp.com", "custom_domain": true }, { "pattern": "www.myapp.com", "custom_domain": true }],
"workers_dev": true
```

- **Keep `"workers_dev": true`.** Adding routes switches the workers.dev address off by default, and every phone that installed the app from that address loses it. Move people over first; switch it off much later, if ever.
- Old DNS records (A/AAAA, `*`) from a previous host can clash with the custom domain: list them and ask the user before deleting. Keep MX/TXT (email, verification).
- Wrangler's login usually can't edit DNS; the user may need to do it in the dashboard. Give exact, numbered steps.
- **"It works on my phone but not my laptop"**: the laptop is holding an old DNS answer or a cached redirect from the previous site. Check with `curl -I` and `dig`; try a private window; clear the browser cache for that site.
- Redirect the spare domain (e.g. a misspelling) to the main one with a redirect rule.
- Each address is a separate installed app with its own sign-in and notifications: tell users to re-add it from the new address.
