Go to the Apple menu and select “System Preferences”
Choose the “Network” control panel, select your network interface from the left side (“Wi-Fi” or “Ethernet” for example), then click the “Advanced” button in the lower right corner of the Network window
Choose the “DNS” tab at the top of the screen
3.1. To add a new DNS server: click on the [+] plus button. Add the two closest DNSFlex Server IP’s in this box
3.2. To edit an existing DNS server: click twice on the DNS IP address you wish to change
3.3. To remove a DNS server: select a DNS server IP address and then click either the [-] minus button or hit the delete key
When finished making changes to the DNS settings, click on the “OK” button. Now click on “Apply” for the DNS changes to take effect, close out of System Preferences as usual
The topmost DNS servers will be accessed first, so you’ll want to put the best performing DNSFlex servers near the top of the list for best results. In the screen shot examples above we used Google.com and OpenDNS for illustration purposes only.
Depending on what you’re doing and why you’re modifying DNS settings, you may wish to flush DNS cache for the changes to take effect, this is particularly true with editing the hosts file. Mac users can clear DNS caches in OS X El Capitan and newer with this command, and for specific Yosemite versions with this command, and even earlier releases of OS X with this. Additionally, you may need to quit and relaunch some applications for the DNS changes to carry over to them.
Advanced Mac users can also adjust DNS from the command line in OS X, though that approach is obviously a bit more technical than simply changing the settings through the Network preference panel. And of course, those on the mobile side of things can change DNS in iOS as well if need be.