Hello there! I am fairly new to Cloudflare. So, the other day, i have managed to deploy a react app on Cloudflare; Yayyy! However, i am having trouble configuring a new
CNAME record whose value is the usual
www to point to the root, which is in my case
wiseai.dev. In other words, i want
www to behave as the root. But, as you may have guessed, it didn’t work.
So, my initial guess was: “maybe it is caused by the
CNAME flattening rule”. To test this hypostasis, I think we should allocate a dummy ip address and create an
A record for
wiseai.dev with that ip. And then generate a
CNAME to point to root. This will remove the use of the
CNAME flattening rule from the equation. Though i didn’t try this solution, however, what i did try is to keep the
CNAME flattening rule there:
The target of the first record is the url where the build is located(the edge?); there is nothing special here. Interestingly, if we apply a permanent redirect page rule to this domain, as shown in the image below(in the following reply), it will make it work.
I believe that it is not the right solution, as it will generate unnecessary traffic.
< HTTP/1.1 301 Moved Permanently < Date: Tue, 19 Jul 2022 09:21:04 GMT < Cache-Control: max-age=3600 < Expires: Tue, 19 Jul 2022 10:21:04 GMT < Location: https://wiseai.dev/
Back to the initial solution, how can i get the ipv4 and v6 for the app deployed on the Cloudflare network? Do you think it will work if we allocate A and AAAA records for these ips? If so, how to do it, cause i need the ip’s, is it random?
Note that i cannot allocate a
CNAME record on the DNS provider i am currently using; it can only be managed on Cloudflare.
I hope you get what i am trying to accomplish — looking forward to your response.