How to change DNS in Linux Ubuntu 16.04
Step #1: Select the Network icon from the top left corner on your screen

Step #2: Then select either "wifi" or "wired" connection which you are using and click on "edit" again or you can also select edit Connections.

Step #3: Open the connection that you wish to modify, e. g. Wired Connection.

Step #4: Select the IPv4 tab and set IPv4 method to Automatic (DHCP).

Step #5: Select "Additional DNS Servers" and enter the DNS servers separated by a comma for e.g. Can-wnp.serverroutes.com and "Apply" afterwards and you are done.

Congratulations you are done.