How to point a sub-domain in one domain to a different domain?

I am new to cloudflare. I have registered two domains, and want one domain to point the other domain.
The primary domain is and I defined a CNAME record for the www sub-domain.
The secondary domain is and I defined an A record with the same IP address as in the primary domain, and a CNAME record for with content of (primary). However the secondary domain gives a “not found” error in a browser window and shows the IP address of the A record in the URL for both URL’s ( and
How can I redirect traffic for the secondary domain to the primary?
Many thanks in advance for your assistance,

You can’t CNAME between Cloudflare accounts unless you’re on a Business or Enterprise plan, but you can do a redirect:

Thank you for your quick response. I will use Page Rules as suggested. Much appreciated,

Thanks once again - just a quick question on page rules can you redirect from a subdomain defined using a CNAME record or must it be an A record?

The Page Rule must match a hostname that’s set to :orange:. It doesn’t matter if it’s an “A” record or a CNAME.

excellent. many thanks.

1 Like

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