Subdomain for branch not working (error code 522)

I have the following DNS records set up for my Cloudflare Pages site, which is manually managed. I have a Github Workflow that uses the cloudflare/pages-action action to publish the site. I do not utilize Cloudflare Page’s integration with Github.

Here’s a picture of my DNS records:

If I visit, it works fine. However, does not. I get error code 522. If I visit it does work which is weird. Why isn’t the CNAME mapping working?

Did you add it to Custom Domains in the Pages dash?

Yes it’s there: isn’t there

Oh you have to add the subdomains too? I’ll try that. Usually when sites ask for custom domains they only want the “” part.

Ok that ended up working. I ended up having to go back to the DNS record and change it back to, because adding the domain in the Pages settings reset it back to, but no big deal.

I think the lessons learned here are:

  1. The “custom domains” in Cloudflare Pages aren’t just the base domain, you enter subdomains too
  2. Pages domains enter corresponding Cloudflare DNS entries
  3. Those entries may need to be modified manually after they are created to suit certain special needs (such as pointing to a branch subdomain)

Thank you very much for the help!

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