I pointed 2 domains at Cloudflare.
Domain A is the public domain.
Domain B should redirect to domain A.
When I try to add Domain B as an add on domain in cPanel, I get this response:
Error: (XID whrhju) This domain points to an IP address that does not use the DNS servers associated with this server. Transfer the domain to this server’s nameservers at the domain’s registrar or update your system to recognize the current DNS servers. To do this, use WHM’s Configure Remote Service IPs interface.
However, both domains point to the same IP address.
So you want domain B to REDIRECT to domain A, yes? In that case you don’t need to set up domain B on your server at all; it doesn’t even need to know that domain B exists. Make sure the DNS entry for domain B is orange-clouded, and then use a Page Rule to redirect the traffic.
Also I just noticed the “removed all DNS entries” part… hopefully you tested after… in order for page rules to work, there does need to be a DNS entry, and it does need to be orange-clouded, however, if you’re only using it for forwarding, it doesn’t matter what the target of the DNS entry is