Open "System Preferences", then "Network". On the left, select the network interface that is used to connect to the internet. For example, it could be Wi-Fi.
Click on "Advanced" at the bottom right, then go to the "DNS" tab. Click on the plus in the left column and enter the DNS record.
Popular DNS server options:
- Cloudflare DNS: 188.8.131.52
- Google Public DNS: 184.108.40.206 and 220.127.116.11
- OpenDNS: 18.104.22.168 and 22.214.171.124
To save, click OK, Apply.
Write to support