Redirect subdomain to a URL
I am wanting to be able to redirect subdomains to a URL. I was previously using ZoneEdit and it was as simple as adding a "URL" record or "STEALTH" record in their DNS editor and a target URL and it just worked.
I am trying to find the same functionality in the Cloudflare DNS and I can't find it.
I am on a free account and mainly using that for a tunnel, but now that I have moved over the nameserver from ZoneEdit to Cloudflare of course those no longer work.
Mainly I just used them as shortcuts. Like I would use "mail.mydomain.xxx" and it would forward me my email site or ai.maydomain.com or another example would be forwarding to a spreadsheet in Google Docs I use all the time.
How can I get this done on Cloudflare?
13 Replies
Cloudflare Docs
Bulk Redirects · Cloudflare Rules docs
Bulk Redirects allow you to define a large number of URL redirects at the account level. These redirects navigate the user from a source URL to a target URL using a given HTTP status code. URL redirection is also known as URL forwarding.
I don't need bulk, is there a way to just do a small amount?
And thank you for your response, I appreciate it.
Only other way would be Single Redirects. But you get a total of 10 rules on free vs 20 URLs in Bulk redirects on free plan
Aha...
Man, trying to figure out the right things to populate where.
If it helps I have these as an example. One gotcha is making sure that you have a DNS record for the source URL
I think what I have looks right.
Doesn't work, but it looks right.
But it says inactive
I have my DNS proxied through Cloudflare. I had it set up on ZoneEdit before.
Did you make a rule using it?
https://developers.cloudflare.com/rules/url-forwarding/bulk-redirects/create-dashboard/#2-create-a-bulk-redirect-rule
Cloudflare Docs
Create Bulk Redirects in the dashboard · Cloudflare Rules docs
To create Bulk Redirects in the Cloudflare dashboard you must:
Maybe my domain isn't proxied correctly.
If you have a Bulk Redirect Rule and a proxied DNS record for
adoc.<your.domain>
then it should workAh, ok. I need to add a CNAME record for that and set it to proxied?
Ok, I got it to work by adding a CNAME that pointed to url-fwd.zoneedit.com and a URL record on ZoneEdit pointing to the website I want it to go to.
I had removed a bunch of the URL entries on ZoneEdit and during the addition of the domain those that did exist were automatically created as CNAME records in the DNS records for the domain in Cloudflare showing forwards back to ZoneEdit.