How to redirect a Cloudflare domain to another URL

submited by
Style Pass
2024-11-15 00:30:34

I'm a fan of Cloudflare domains because they are at cost purchase and renewal and don't have much of the spam and upselling comm with many other domain providers (like those famous for Superbowl commercials).

However, sometimes doing something in Cloudflare as simple as redirecting one domain to another static URL can be more complicated than you'd expect.

I've spent enough time relearning how to do a simple static redirect (instead of Cloudflare's more complicated dynamic version) by digging through Cloudflare docs and forum posts that it was worth codifying how to do the process to save myself time in the future.

This creates two A records that point to an IPv4 reserved address set by the IETF for examples. Without the proxy, the DNS records should route to nowhere. However, we'll use the proxying to have Cloudflare redirect the DNS request before it can reach these.

9) Test your redirect by going to your domain. It may take a while for the DNS change to propagate. See Troubleshooting below if you are getting "This site can't be reached" DNS_PROBE_FINISHED_NXDOMAIN or other issues.

Leave a Comment