Page rule redirect to subdomain does not work

Hi Community,

I think I’ve got kind of a special case here.
I try to redirect all root domain traffic to a subdomain with the help of page rules. Unfortunately that seems not to work.

The case in detail:
I’ve got a root domain thepractory.com
And we’ve got two applications running on the subdomains
community. and academy.

I want to do is to redirect all traffic from the root domain to the subdomain community.thepractory.com

What I did/tried so far:

  • DNS records for the subdomains are set and working properly
  • Dummy DNS record for the root domain is defined and points to 192.0.2.1
  • Two page rules are set up.

Unfortunately that does not work. When I browse to the root domain, nothing happens.
Did I miss anything. Is anything here wrong?

Thanks and kind regards,
Ben

Dig is returning the dummy IP:

; <<>> DiG 9.10.6 <<>> @1.1.1.1 thepractory.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55016
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;thepractory.com.		IN	A

;; ANSWER SECTION:
thepractory.com.	300	IN	A	192.0.2.1

;; Query time: 176 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Wed Jan 12 11:30:10 GMT 2022
;; MSG SIZE  rcvd: 60

You’ll need to proxy these records (set the icon to orange for all DNS records). DNS-only records wont have any Cloudflare products run against them (we basically serve the browser with the IP and close the connection for these records (slightly simplified explanation!)).

2 Likes

Hey smarsh,

thanks for that answer. It works perfectly now after activating the proxy.
Now I feel a little bit stupid, because the solution was so easy.

Many thanks again!!!

No worries at all :slight_smile: Happy to help!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.