Error 522 - Connection timed out when hosting Github repo on Cloudflare pages with a DNS record

I am trying to host a Website on Clouflare CDN using github as a source, but am getting a 522 error.

This should be pretty straight forward, so I am assuming the solution is a simple one.

I am building a website on Cloudflare pages and the generated domain works as expected

The certificate for this is generated by Cloudflare.

Then I created a CNAME in cloudflare DNS to point my Pages project to my websites subdomain.

my website is and works well, though the subdomains that work are hosted elsewhere.
I created a CNAME record like this.
CNAME record = subdomain,, TTL Auto, Proxy Status Proxied

I expect my new hosted site to be and to point to

when I ping and they both respond to the same IP address

but when I enter it reponds with a

522 Error Connection timed out

I have waited more then 24 hours to be sure

1 Like

Did you link it in the Custom Domains section or did you manually do it? It should be done through the Custom Domains setting. If you did it there then what’s the status?


Yes this was the solution. Thanks for that!
In CloudFlare Page Project, each project has a Custom domains section that needs the url specified.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.