I would like to redirect one of my subdomains to an outside URL. Example: my xyz.example.com
to outsideurl.net
. Is it possible with use of Cloudflare
services? I have tried to use Page Rules
with help of this tutorial, but it seems this tutorial is for another purposes maybe.
1 Answer
It won't work if you simply create a Page Rule -- you need to add a DNS record as well.
In your case, you can add a CNAME for xyz
which directs to @
, then set up a Page Rule to forward xyz.example.com
to outsideurl.net
.
From the FAQ:
The number one reason that a Page Rule isn't working, such as URL forwarding, is that the Page Rule you created is on a record that is not proxied by Cloudflare in your DNS settings.
Example: You have a Page Rule that redirects a subdomain (subdomain.yoursitename.com) back to your root domain (yoursitename.com). If you do not have that record proxied in your DNS settings for the subdomain record (orange cloud), Cloudflare's proxy is not running over the record and a Page Rule will not work because it is going direct to your server.
-
2I added a CNAME
@
but the redirect in page rule takes me to the root of the url and not deep into the page.– t qMay 22, 2019 at 19:57