By default Ubuntu has IPv6 enabled on network interfaces. This means when you try and visit a website, an IPv6 DNS request is made. It’s unlikely your ISP supports IPv6 and your client hangs waiting for DNS response from IPv6, whilst the IPv4 one has come back immediately. Eventually the IPv6 request times out, and if you reload the page it is instantaneous. This is because the cached IPv4 address is used. The solution is to disable IPv6

The Quad-A IPv6 DNS query is sent out immediately after the regular IPv4 A query.The Quad-A IPv6 DNS query is sent out immediately after the regular IPv4 A query.

Run the following in a terminal to fix this.
<br></br>
sudo echo '##IPV6\nnet.ipv6.conf.all.disable_ipv6 = 1\nnet.ipv6.conf.all.disable_ipv6 = 1\nnet.ipv6.conf.default.disable_ipv6 = 1\nnet.ipv6.conf.lo.disable_ipv6 = 1' >> /etc/sysctl.conf<br></br>

This adds a few lines to /etc/sysctl.conf that disable IPv6 at boottime.

Reboot.