DNS-over-HTTPS issues: some domain names won't work


#1

I was trying
curl "https://cloudflare-dns.com/dns-query?ct=application/dns-json&name=example.com"
and it returns the results in JSON format. However, if you replace the cloudflare-dns.com part to the following it stops working and sends out a 301:

www.cloudflare-dns.com
1dot1dot1dot1.cloudflare-dns.com
one.one.one.one

Replacing to the following one works:

1.1.1.1
1.0.0.1
mozilla.cloudflare-dns.com

BTW, I don’t have IPv6 connection so I can’t test for IPv6 addresses:

2606:4700:4700::1111
2606:4700:4700::1001

Please fix.


#2

Try
curl "https://cloudflare-dns.com/dns-query?ct=application/dns-json&name=example.com&type=A"

You need to add type parameter

Documentation refers only to use cloudflare-dns.com

Recently, the RFC was released https://www.rfc-editor.org/rfc/rfc8484.txt