If you don’t root permission on your device, you have to face some limitations of the Android system. First, changing the DNS settings will only affect your current Wi-Fi network connection. There is no option available to change the DNS settings for your 3G/4G data networks connection. Second, you must change the DNS server settings for each Wi-Fi network you want to connect to.To change the DNS settings:
  1. Open the Settings on the device.
  2. Select “Wi-Fi”.
  3. Long press your current network, then select “Modify network”.
  4. Mark “Show advanced options” check box.
  5. Change “IP settings” to “Static”
  6. Add the DNS servers IPs to the “DNS 1”, and “DNS 2” fields.

    Google Public DNS:

    DNS 1: 8.8.8.8, DNS 2: 8.8.4.4

  7. Press “Save” button, disconnect from the network, and reconnect for changes to take effect.
UPDATE: Note that setting IP Settings to “Static” will affect the way that DHCP does address allocation and can be used only as a short-term solution. In order to work correctly, you have to configure your router and assign static IP to the device’s MAC address.How to Change DNS Settings on AndroidHow to Change DNS Settings on Android

Change the DNS settings if you have root permissions

If you have rooted your Android device, you can use free and simple DNS Changer application. With DNS Changer you can quickly set DNS servers IP manually or select them from a list of DNS providers. You can set program to automatically apply these settings both to Wi-Fi and 3G/4G data connection.DNS Changer ScreenshotDNS Changer Screenshot