How to move a domain from one cloudflare pages project to another without downtime?

Trying to set a custom domain in a pages project, I get this message:
That domain is already associated with an existing project. Use a different domain or find the project already using this domain and remove it.
But finding the project already using the domain and removing it would cause downtime. Can I instead just change the DNS record manually? Is it necessary to configure something in the pages project?
4 Replies
Chaika
Chaika•11mo ago
Can I instead just change the DNS record manually? Is it necessary to configure something in the pages project?
If you don't add it to the Pages Project, you'll get a 522 because it needs to be added in there for it to work. Under the hood it just uses CF for SaaS, a kind of allowlist for host headers Pages needs time to initialize and issue the cert (if not covered by anything else), don't think there's a magical way around that. Depending on what you are doing you may be able to work around it though. You could setup the new pages project on a slightly different subdomain and then add a redirect for it
Amadeus Pagel
Amadeus PagelOP•11mo ago
What I really want to do is to move a pages project that was using wrangler to git. Is there another way to do that?
Chaika
Chaika•11mo ago
No, sadly you cannot convert an existing project between project types. You can direct upload via wrangler to a git based project though
Amadeus Pagel
Amadeus PagelOP•11mo ago
OK, thanks anyway -- I probably would have tried changing the DNS record which would have been quite stressful 😉
Want results from more Discord servers?
Add your server