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 https://recyclarr.dev, it works fine. However, https://next.recyclarr.dev does not. I get error code 522. If I visit https://next.recyclarr-wiki.pages.dev 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:

next.recyclarr.dev 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 “domain.com” part.

Ok that ended up working. I ended up having to go back to the DNS record and change it back to next.recyclarr-wiki.pages.dev, because adding the domain in the Pages settings reset it back to recyclarr-wiki.pages.dev, 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.