Warning
Create a Time Machine backup before major updates, disk operations, or security changes on macOS.
What you will achieve
Point your Mac at reliable DNS and confirm the change stuck.
1) Set DNS in network service
- Open System Settings → Network.
- Select Wi-Fi or Ethernet service, then Details → DNS.
- Add resolvers like
1.1.1.1and9.9.9.9.
2) Apply and reconnect network
Click OK, then Apply.
3) Validate from Terminal
networksetup -getdnsservers Wi-Fi
scutil --dns