I’m new to Cloudflare so I’m not sure if I am posting this in the correct place here. If not, please forgive me. Can you please tell me where I can find the information highlighted in BOLD ITALICIZED in the API: curl https://api.cloudflare.com/client/v4/zones/__**$ZONE_ID**__/dns_records/__**$DNS_RECORD_ID**__ \ -X PUT \ -H ‘Content-Type: application/json’ \ -H "X-Auth-Email: $CLOUDFLARE_EMAIL" \ -H "X-Auth-Key: $CLOUDFLARE_API_KEY" \ -d ‘{ “comment”: “Domain verification record”, “content”: “198.51.100.4”, “name”: “example.com”, “proxied”: true, “settings”: { “ipv4_only”: true, “ipv6_only”: true }, “tags”: [ *“owner:dns-team”** ], “ttl”: 3600, “type”: “A” }’
What steps have you taken to resolve the issue?
Please help! I have searched for a couple of months to find it. I’m 99% certain I have found the “Zone ID”, the “Cloudflare Email”, and the “Cloudflare API Key”. What I have not been able to find is the “DNS Record ID”, the “Owner Verification Record”, and the “Owner:dns-team”.
I was just checking to see if anyone had replied to my post, and I noticed I said one of the things I could not find was “the “Owner Verification Record””. What I meant to say was the “Domain Verification Record”. Sorry for any confusion this may have caused.
I’m to self host a website for my family but I’m behind a dynamic IP Address. So yes, I’m trying to change my IP Address in the DNS servers using CloudFlares DDNS service.
So in “My Profile” I found “API Tokens”. In there I found three things:
1.) “API Tokens”
2.) “Global API Key”
3.) “Origin CA Key”
Which one do I use for “X-Auth-Key: $CLOUDFLARE_API_KEY”?
Also, are you saying I can just delete “comment”: “Domain verification record” and “tags”: [ “owner:dns-team”* ] from the script from the "Update DNS Record script?
The only field you need to update a DNS record is the content field, in which you pet the new IP address. You don’t need name, proxied, settings, tags, ttl or any other.
There are other tools that can update your IP on Cloudflare though.
Some people also use other DDNS services and just set a Cname on Cloudflare to the DDNS hostname.
There are also Cloudflare Tunnels, which would be the preferred solution unless your website is a private filesharing website.
The tunnel is a software that you install on your server that connects to Cloudflare, instead of Cloudflare trying to connect to your server via A records.
Oh! Okay. Thank you for letting me know that. After I get this all straightened out, I guess the next step would be to look into the tunnel. What is the “$DNS_RECORD_ID”?
Thank you. The List DNS Script worked great. However, I got the following error message when I ran the Update DNS script:
{“result”:null,“success”:false,“errors”:[{“code”:9300,“message”:“DNS record has 1 tags, exceeding the quota of 0.”},{“code”:9227,“message”:“The IPv4 Only and IPv6 Only settings are not available to this zone.”}],“messages”:}
It did not update the following “A” records:
*
www
I tried adding: “name”: “www”,
**“name”: “*”, **
It still didn’t work, so I tried adding: “content”: “74.152.38.21”,
above the previous additions so it looked like this: “content”: “74.152.38.21”, “name”: “www”, “content”: “74.152.38.21”,
**“name”: “*”, **
It still didn’t work. How do I get it to update those?
Very strange. I changed “name”: “the-emberhood.net”, to “name”: “*”,. It did change the “A” record name “" but it also kept the IP Address for the same name. Basically, it created a new “A” record named "”. AND it reset the IP address for “A” record named the-emberhood.net back to the previous IP Address.
I deleted the A"A record name “" that still had the previous IP Address and in the script, I changed **“name”: "”,** to “name”: “www”,. It updated that record with the new IP Address but also kept the the original IP Address for the “A” record named 'www". However, it removed the “A” record named “*”.
I will get the DNS records set back up the way they originally and upload screenshots for you if needed. Just let me know if you need me to do that.
I went back to the way the records were set up in the beginning:
Type Name Content
A script 8.8.8.8
A * 24.60.51.219
A the-emberhood 24.60.51.219
A www 24.60.51.219
After running the Update DNS script:
-d ‘{
“content”: “74.152.38.21”,
“proxied”: true,
“ttl”: 3600,
“type”: “A”
}’
I ended up with:
Type Name Content
A script 274.62.95.211
A * 24.60.51.219
A the-emberhood 24.60.51.219
A www 24.60.51.219
I know I’m screwing up somewhere. I’m new at all of this and I thank you for you patience.