Hi there,
I’m getting tired to do a simple things.
I just switch a TLD to Cloudflare.
Then I used to have a subdomain a.myhost.fr
that redirect to anOtherDomain.com
(manage by TXT 1|https://anOtherDomain.com
)
Since I switched to Cloudflare I can’t find the way to get that redirect working.
I tried :
Rules → Redirect Rules (by following this : https://developers.cloudflare.com/rules/url-forwarding/single-redirects/examples/
)
Bulk Redirect ( by following : https://developers.cloudflare.com/fundamentals/get-started/basic-tasks/manage-domains/redirect-domain/
)
classic DNS record 1|…
Https DNS record
So question is : what is the way to make a simple redirection of a sub domain to an other domain while using Cloudflare ?
Thanks for your help.
I like to create only one Proxied AAAA record using the discard prefix 100::
for sub.example.com
. You can then create a single redirect similar to the following.
Redirect Rule details
When incoming requests match
Field : Hostname
Operator : equals
Value : sub.example.com
Then
Type : Static
URL : https://example.org/
Status code : 301
Preserve query string :
More examples can be found here:
Cloudflare Page Rules will soon be deprecated, as they are being replaced by a group of new Cloudflare Rules.
Redirect Rules (beta) helps you make all kinds of dynamic or static redirects.
Examples of some of the most requested Redirect Rules:
1 - Canonical redirect (naked domain to www.)
Redirect Rule details When incoming requests match
Field: Hostname
Operator: equals
Value: example.com
Then
Type: Dynamic
Expression: concat("https://www.example.com", http.request.uri.path) …
1 Like
system
Closed
August 13, 2023, 11:31am
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.