This question may reveal the depths of my ignorance about the way DNS works, but I have my iMac “location” settings configured to use Cloudflare DNS (1.1.1.1, etc.), my wireless access point (Netgear Orbi) is configured to use Cloudflare DNS, and my router (Frontier FIOS Arris NVG468MQ) is configured to use Cloudflare DNS. My expectation is that my DNS queries should be going through Cloudflare DNS.
Yet when I run a traceroute (either through Network Utility or Terminal), none of the Cloudflare public DNS addresses shows up in the route.
DNS doesn’t have any (direct) impact on your network route. Instead, DNS is the service which translates the name you know (e.g. cloudflare.com) to the IP address that your computer needs to know.
But once that translation is finished, the routing of packets to the destination is unchanged.
In addition to @thedaveCA’s correct answer, you can use the dig or nslookup coommands to check if DNS queries are being answered by the expected server:
dig department21.org
; <<>> DiG 9.10.6 <<>> department21.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9372
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1452
;; QUESTION SECTION:
;department21.org. IN A
;; ANSWER SECTION:
department21.org. 300 IN A 104.18.46.35
department21.org. 300 IN A 104.18.47.35
;; Query time: 109 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Sun Mar 08 17:16:18 -03 2020
;; MSG SIZE rcvd: 77