How To Redirect A Domain On Cloudflare

By James LePage
 on January 6, 2021
Last modified on January 7th, 2022

How To Redirect A Domain On Cloudflare

By James LePage
 on January 6, 2021
Last modified on January 7th, 2022

In this article, we're going to show you how to redirect a domain on Cloudflare. This is especially useful if you have moved your website, still have the old domain, and want to point it to the new location without having to use the HTAccess method or a CNAME record.

This question could also look like this: "How do I use Cloudflare DNS records to redirect my domain?"

The first thing to note is that you do not use DNS to redirect a domain. DNS is not created for that. Instead, you will use Cloudflare page rules. Even if you're on a Cloudflare free plan, and you're looking to redirect your domain, you have access to three free page rules. For a simple redirect, you only need one period let's talk about how to redirect your domain on Cloudflare, no matter what your plan tier is.  

The first step is navigating to the page rules tab of your Cloudflare dashboard. This is not under DNS, instead it is under its own section. Once you're on the page rules tab, go ahead and click on create a new page rule button.

First, type in your root name, with a slash after it, and after an *. What this do is create a catchall redirection rule, so if the domain matches anything under that route, it will redirect to the new location.

Under then these settings are, select the forwarding URL option. Finally, enter the URL that you would like your Cloudflare domain to redirect to within the respective input field.

Finally, apply the rule, and your old domain will now forward to the new one. Any URL underneath it will forward to the applied domain as well.

The one other thing I would do is delete all the DNS records except for a cname WWW pointing to the original domain, and setting the original domain to have an A record pointing to That IP is just a basic placeholder that has been used since the Internet was invented.

If your Cloudflare domain redirection is not working, ensure that it is being proxied through the service. That means that you need to have the a record with the orange cloud showing. If the cloud is Gray then it is not proxy through the service and the page rule will not apply to it.

More info:

Subscribe & Share
If you liked this content, subscribe for our monthly roundup of WordPress news, website inspiration, exclusive deals and interesting articles.
Unsubscribe at any time. We do not spam and will never sell or share your email.
Notify of
Newest Most Voted
Inline Feedbacks
View all comments
6 months ago works! thx.

5 months ago


2 months ago

is 129 or 192 ???

2 months ago
Reply to  xcyenze

I've been wondering about the same. appears to be owned by "AS30992 MTN Network Solutions (Cameroon)" and as such doesn't seem to be related to local 127.0.01 type addresses. also works, but that also points to some other org.

That leads me to believe that any A entry will work, as the page rules get processed before this is hit, but I'd still be wary of adding A entries to random addresses. Just grab the IP address of your web host and use that. I'm using Vercel, so I used and it's fine.

1 month ago

this works for me. Thanks a lot.

Laxmikant Bhumkar
Laxmikant Bhumkar
27 days ago

Post includes instead of

Please correct it.

Scott N
Scott N
20 days ago

According to RFC 5737:

The blocks (TEST-NET-1), (TEST-NET-2), and (TEST-NET-3) are provided for use in documentation.

Therefore the screenshot is right, and the text description is wrong. Use

Article By
James LePage
James LePage is the founder of Isotropic Design, a digital agency that builds WordPress websites. I read, write and design constantly!
We're looking for new authors. Explore Isotropic Jobs.
🇺🇸 English
Save posts, access exclusive content, join members-only communities and more.
Dark Mode Toggle
Love web dev? Join the Isotropic weekly newsletter.
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram

Your Cart is Empty