The process of changing the DNS server on your Raspberry Pi is a pretty simple process and involves modifying a single file. In addition to showing you what file you will need to edit, we will also walk you through a couple of methods of ensuring your Raspberry Pi is using your newly set DNS.
There are many reasons why you might want to utilize a different DNS server to your ISP’s default. One of the top reasons being performance. Many ISP provided DNS servers can be incredibly slow at lookups and sometimes can take ages to update and add domains.
There is also the privacy factor to be considered, typically your ISP’s DNS server will leak your IP address as well as cache details about what websites you are visiting. Alternatives like Cloudflare 220.127.116.11 offer increased privacy by not logging any identifiable data and offering HTTPS over DNS.
If you’re looking to set up a dynamic DNS for accessing your Raspberry Pi then our tutorial on port forwarding and setting up Dynamic DNS will help you out. This tutorial simply goes into the steps of changing the way your Pi resolves domain names.