Migrated Pages to Workers. Error 522 - Connection timed out.

I have migrated from Pages to Workers and changed (deleted and created new one) root DNS CNAME record to <my-worker>.<my-domain>.workers.dev, but now my website is down with error "Connection timed out. Error code 522". DNS record change should take up to 5 minutes, but few hours have passed already and it is still the same.
2 Replies
Rostislav
RostislavOP3mo ago
Visiting <my-worker>.<my-domain>.workers.dev works fine.
Rostislav
RostislavOP3mo ago
OK, I solved it. After migrating to Workers you should delete the DNS record for your custom domain first. Then go to specific Worker and add a custom domain from there. It will create appropriate DNS records. https://developers.cloudflare.com/workers/configuration/routing/custom-domains
Cloudflare Docs
Custom Domains
Custom Domains allow you to connect your Worker to a domain or subdomain, without having to make changes to your DNS settings or perform any certificate management. After you set up a Custom Domain for your Worker, Cloudflare will create DNS records and issue necessary certificates on your behalf. The created DNS records will point directly to y...

Did you find this page helpful?