Open System Preferences and select Network
Posted: Wed Feb 12, 2025 7:07 am
Select Use the following DNS server addresses and enter your preferred and alternate DNS server addresses for example, 1.1.1.1 and 1.0.0.1 for Cloudflare.
On MacOS
Select your active network connection such as Wi-Fi or Ethernet and click Advanced.
Go to the DNS tab.
Click the + button to add a new DNS server. Enter the desired DNS server addresses e. 8.8.8.8 and 8.8.4.4 for Google DNS.
Click OK and then Apply to save your changes.
Close System Preferences and restart your computer to apply the new DNS settings. Test your Internet connection to see if the problem is resolved.
In Linux
Open Terminal Ctrl-Alt-T.
Edit the file etcresolv.confusing a text editor such as japan telegram data nano or vim for example, sudo nano etcresolv.conf.
Add or modify the lines to include the DNS server addresses you want for example, nameserver 1.1.1.1 and nameserver 1.0.0.1.
Save the file and exit the text editor.
Restart the network service using a command such as sudo systemctl restart networkingfor systems using systemd or sudo service network-manager restart.
Verify that the new DNS settings are applied by using ping, nslookup, or dig to perform a DNS lookup.
Clear DNS cache
Flushing the DNS cache can resolve issues caused by stale or corrupted DNS records. Flushing the DNS cache clears all stored DNS records, forcing your computer to retrieve updated information the next time it requests a domain name.
On MacOS
Select your active network connection such as Wi-Fi or Ethernet and click Advanced.
Go to the DNS tab.
Click the + button to add a new DNS server. Enter the desired DNS server addresses e. 8.8.8.8 and 8.8.4.4 for Google DNS.
Click OK and then Apply to save your changes.
Close System Preferences and restart your computer to apply the new DNS settings. Test your Internet connection to see if the problem is resolved.
In Linux
Open Terminal Ctrl-Alt-T.
Edit the file etcresolv.confusing a text editor such as japan telegram data nano or vim for example, sudo nano etcresolv.conf.
Add or modify the lines to include the DNS server addresses you want for example, nameserver 1.1.1.1 and nameserver 1.0.0.1.
Save the file and exit the text editor.
Restart the network service using a command such as sudo systemctl restart networkingfor systems using systemd or sudo service network-manager restart.
Verify that the new DNS settings are applied by using ping, nslookup, or dig to perform a DNS lookup.
Clear DNS cache
Flushing the DNS cache can resolve issues caused by stale or corrupted DNS records. Flushing the DNS cache clears all stored DNS records, forcing your computer to retrieve updated information the next time it requests a domain name.