Redirect new Cloudflare domain to another domain

I have transferred new domain to Cloudflare eg mydomain.com

I want to redirect any request coming into mydomain.com or www.mydomain.com to https://target.com/directory

I have setup a Host redirect rule. It is not working.

I believe before that comes into effect, I need to setup A records for @ and www (for the domain root/apex and www to resolve to Cloudflare) but not sure what IP to point it to? What am I missing here?

Use a dummy proxied value of A 192.0.2.1 or AAAA 100:: for hostnames that are for redirection only.

(You can use anything that’s not a Cloudflare IP address as it’s ignored anyway, but these help to blackhole traffic if your redirect is disabled or deleted by mistake and remind you there is a redirect in place when looking at DNS records).

2 Likes

Thank you so much. This works!

Your perfect instructions would make sense to be inserted into the official Cloudflare doc URL forwarding | Page Rules · Cloudflare Rules docs

Thanks again!

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