How to redirect transparently a domain to another

I would like to redirect transparently a domain to another, both are in Cloudflare.

For example, redirect mydomain.net/anything to mydomain.com/anything. I would like the url mydomain.net/anything to stay in the browser, not to be replaced by the destination domain, but provide the same content as the destination domain would do.

I tried Rules, but i allows only to redirect with a change of domain url. I couldn’t find a way to keep the original domain name.

Can I use CNAME for this?

Greetings,

Thank you for asking.

In that case, I’d suggest using:

  1. Transform Rules → URL Rewrite
  2. Cloudflare Workers to fetch and load another website’s content.

For CNAME, I am not 100% but you might have an issue and see an error as far as you would CNAMEing :orange: domain to :orange: domain :thinking:

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