DNS Errors
Hello!
I'm a new user to cloudflare. I recently followed a guide on how to set up a tunnel through my raspberrypi, after purchasing a domain so I can reach my recipemanager when outside of my home. I did reach some obstacles when setting up the tunnel, but luckily I understood enough in order to make it properly launch and now I can reach webpage properly.
I took a look at the "DNS" records and I have theese two recommendations prompted to me;
"Add an A, AAAA, or CNAME record for www so that www.pulseprintlab.com will resolve.
Add an MX record for your root domain so that mail can reach @<domain>addresses or set up restrictive SPF, DKIM, and DMARC records to prevent email spoofing."
PROBLEM 1:
I have been googling, reading the learning center, reading comments on people's post in regards to this and I still dont get it. I've tried multiple things, specifically in regards to www I tried;
"A-record = www - <rpi's static ip>
But that prompted an error message (code 9003 I believe) I tried A-record = www - <my-domain.com> and that is not a valid ipv4 adress I Tried A-record = @ - <my-domain.com> and <rpi's static ip> and neither worked. Could someone shed some light on what I need to do here? If it makes a difference I set up the tunnel and settings through terminal on my rpi. I also have one CNAME as of now after I set everything up through terminal on the rpi; CNAME = <my-domain.com> - <specific key (content)> Next to the CNAME on the DNS-page on Cloudflare I do have an information icon stating "CNAME records normally can not be on the zone apex. We use CNAME flattening to make it possible" PROBLEM 2: I read that (https://community.cloudflare.com/t/deprecated-redirect-example-com-to-www-example-com/78348) I can set up a PAGES rule to redirect example.com to www.exmaple.com. My input is; URL: http://<my-domain.com> Destination URL: https://www<my-domain.com> The first problem I am having is with the Step 1. To set up A = @ - <dummy ip>. It says I cant do that because I have a CNAME with @, even though my CNAME = my-domain.com SPECIFIC ERROR I AM GETTING; "A CNAME record with that host already exists. For more details, refer to https://developers.cloudflare.com/dns/manage-dns-records/troubleshooting/records-with-same-name/. (Code: 81054) " If I skip this step and move on to step 2 I enter http://<my-domain.com> it doesn't open up anything. I tried changing http to http in the destination url aswell (so it would forward to www atleast) but that does not work either. In the tutorial on the url said person uses /$1 after the url on the destination url-field, however when I have this I get an error code (1004) Could someone explain how I can set up so that it forwards to use https and www. I.E > example.com to be changed to www.example.com and to have http be changed to https://. Or even better have them all list to https with www. If anyone have any helpful tips on other things I should add for security reasons I'd greatly appreciate that aswell as I know absolutely nothing about this If it matters I am on the free plan. Thanks in advance, Sincerely a noob
But that prompted an error message (code 9003 I believe) I tried A-record = www - <my-domain.com> and that is not a valid ipv4 adress I Tried A-record = @ - <my-domain.com> and <rpi's static ip> and neither worked. Could someone shed some light on what I need to do here? If it makes a difference I set up the tunnel and settings through terminal on my rpi. I also have one CNAME as of now after I set everything up through terminal on the rpi; CNAME = <my-domain.com> - <specific key (content)> Next to the CNAME on the DNS-page on Cloudflare I do have an information icon stating "CNAME records normally can not be on the zone apex. We use CNAME flattening to make it possible" PROBLEM 2: I read that (https://community.cloudflare.com/t/deprecated-redirect-example-com-to-www-example-com/78348) I can set up a PAGES rule to redirect example.com to www.exmaple.com. My input is; URL: http://<my-domain.com> Destination URL: https://www<my-domain.com> The first problem I am having is with the Step 1. To set up A = @ - <dummy ip>. It says I cant do that because I have a CNAME with @, even though my CNAME = my-domain.com SPECIFIC ERROR I AM GETTING; "A CNAME record with that host already exists. For more details, refer to https://developers.cloudflare.com/dns/manage-dns-records/troubleshooting/records-with-same-name/. (Code: 81054) " If I skip this step and move on to step 2 I enter http://<my-domain.com> it doesn't open up anything. I tried changing http to http in the destination url aswell (so it would forward to www atleast) but that does not work either. In the tutorial on the url said person uses /$1 after the url on the destination url-field, however when I have this I get an error code (1004) Could someone explain how I can set up so that it forwards to use https and www. I.E > example.com to be changed to www.example.com and to have http be changed to https://. Or even better have them all list to https with www. If anyone have any helpful tips on other things I should add for security reasons I'd greatly appreciate that aswell as I know absolutely nothing about this If it matters I am on the free plan. Thanks in advance, Sincerely a noob
5 Replies
Would you wanna check what "rpi's static ip" did you put in the A record? You don't have to share your ip in the chat but you would need to make sure that it's not a private ip. Private IPs couldn't be proxied (code 9003). Btw A records only accepts valid ipv4 address, not domains.
Cloudflare Docs
DNS record types | Cloudflare DNS docs
This page provides information about some of the different types of DNS records that you can manage on Cloudflare. For guidance on how to add, edit, or delete DNS records, refer to Manage DNS records.
In the A record I tried the private IP indeed. Because if I tried to input the domain-name i just got an error because I have a CNAME with that already (from setting up a tunnel through the terminal)
<updated my post>
Anyone? :/
bump
This seems like your DNS is crazy
Problem 1. An A record needs to be pointing to your public ip @Nextep
Eg; example.com => 123.567.xx.xx not 192.168.x.x
You can set www. as the A record subdomain, but that means only www. will work, alternatively, just use a www CNAME and point to your root
Problem 2: Sounds like you have a root cname, which will be causing you greif
@james090500
Hi and thank you so much for your reply. I followed this guide; https://pimylifeup.com/raspberry-pi-cloudflare-tunnel/
In regards to me having a root cname I dont know how I did it, all I did was do what the guide said and I believe that step 6 caused it; "cloudflared tunnel route dns TUNNELNAME DOMAINNAME"^
In the domain name I put my domain that I bought on cloudflare.
When you say my public IP does that mean a public ip I get through cloudflare, or the public IP of my home-network?
Cheers
Pi My Life Up
How to set up a Cloudflare Tunnel on the Raspberry Pi
Secure connection without opening ports