Redirect rule for Cloudflare DNS

Hi guys, I'm trying to setup a forwarding rule for one of my DNS's that's not working too well. I'm trying to achieve this ---->>> mywebsite.com forward to https://www.mywebsite.com Is there a Redirect or Page rules that can help me get this setup?
18 Replies
Cyb3r-Jak3
Cyb3r-Jak316mo ago
If it is a static redirect then using bulk redirects is easiest
╲⎝⧹ zǝɹo ⧸⎠╱
Looking into it now. Thanks for the direction 👍 looks like its not working. The Bulk rule points to the ---> Redirect incoming requests based on the URL redirects in the following list: mywebsite
Cyb3r-Jak3
Cyb3r-Jak316mo ago
Do you have a cloudflare DNS record for the source url?
╲⎝⧹ zǝɹo ⧸⎠╱
Yes there is a CNAME record for the source url. the www.mywebsite.com Can I share some screenshots? would that be helpful? I guess I'm trying to figure out how do I do a naked domain redirection on Cloudflare? mywebsite.com forward to https://www.mywebsite.com/ . Bulk redirection doesn't work in my case.
Cyb3r-Jak3
Cyb3r-Jak316mo ago
Sure screenshots are helpful
╲⎝⧹ zǝɹo ⧸⎠╱
Sorry for the late reply. Was trying to figure things out. Okay soo far this is what I got to. I have a host on AWS mywebsite.cloudfront.net and I try to add a @ to the CNAME but it says that the CNAME exists already. I tried to also add mywebsite2.cloudfront.net to the @ in CNAME but it says the entry already exists but when I use the search bar the entry does not exist... This is puzzling ... Is there some specific format i need to use for CNAME? There are other CNAME entries with www that point to mywebsite.cloudfront.net and they work but not @ Do you know why doesn't @ work when adding a CNAME record to the DNS records? I tried testing it on another domain and I'm having the same issue.
Chaika
Chaika16mo ago
@ is just shorthand for your actual domain name/apex, if you can search for @, if you see any A/AAAA/CNAMEs with the name of your domain (example.com), then that's what it is conflicting with. Keep in mind CNAMEs are not normally supported on your apex, Cloudflare only supports them by flattening them to synthetic A/AAAA records that aren't visible in your dashboard
╲⎝⧹ zǝɹo ⧸⎠╱
okay soo I need to remove all the entries where my site exists to add the entry?
No description
╲⎝⧹ zǝɹo ⧸⎠╱
Im just trying to add all-about-vision.com as a CNAME to mywebsite.cloudfront.net I also tried the URI but cloudflare didn't redirect that
Chaika
Chaika16mo ago
If your goal is to add a CNAME pointing to cloudfront yes. If you're still trying to just get the redirect working, if you have the bulk redirect already all setup, then instead you should remove all those A records and put just a AAAA @ 100:: Proxied (originless record, just getting the traffic to Cloudflare), and then the bulk redirect would work if it matches Although I don't see anything on https://www.all-about-vision.com that it would redirect to, unless you're trying to redirect to a different website altogether
╲⎝⧹ zǝɹo ⧸⎠╱
yes yes this is a test DNS im using to make changes. I'm worried about bring down the actual site in my testing. This doesn't point to anywhere. Its more like to get the rules correct and then get the real site redirected properly. The real site does something wierd where it works when i use www.^ but when i use the domain name directly it jsut loops and fails.. It looks alright in the backend, I'm thinking it has something to do with the redirects on Cloudflare
Chaika
Chaika16mo ago
The real site does something wierd where it works when i use www.^
Can you define weird? If you get endless redirects on www, that's usually caused by your SSL/TLS setting (SSL/TLS -> Overview) being "Flexible" when it should be Full (Strict) but yea on the test site, remove them all and put AAAA @ 100:: Proxied and the redirect should at least work
╲⎝⧹ zǝɹo ⧸⎠╱
Hi Chaika! jsut wanted to update that I removed the A records that point to 52.85.151.* and then the CNAME record could be added. Looks like everything is working fine.. I do see these A records 52.85.151.* in the test DNS as well. Do you know what these are? Are they related to Cloudflare in any way and is there any issue removing them?
Chaika
Chaika16mo ago
They're nothing Cloudflare would add, looks like that IP block is owned by Amazon / AWS. You could check your Audit Log and try to see when/who added them: https://developers.cloudflare.com/fundamentals/account-and-billing/account-security/review-audit-logs/ If your goal is to remove them and place a redirect there instead, then you'd be fine
╲⎝⧹ zǝɹo ⧸⎠╱
Thank you thank you. That info is interesting. Noone can find those endpoints other than the IP's listed in cloudflare. Just another undocumented change I suppose How can you tell those IP's are owned by AWS?
Chaika
Chaika16mo ago
Those IP Resources belong to ARIN (North America's Internet Number Registry), you can look them up and see that they are allocated to Amazon/AWS: https://search.arin.net/rdap/?query=52.85.151.1 It looks like specifically EC2/VPS Instances. There's lots of other IP lookup tools/databases out there as well that scrape info from the different regstries and other provided geo data
ARIN Whois/RDAP
ARIN is a nonprofit, member-based organization that administers IP addresses & ASNs in support of the operation and growth of the Internet.
Colonel_UnderPants
i have tried doing this but it doesn't work, i'm working on setting up redirects for minecraft voting sites, is it possible because i have a wildcard domain that redirects don't work?
Chaika
Chaika16mo ago
use your own post, don't post on others, I'll reply in yours

Did you find this page helpful?