Edit: This answer is assuming you are connected using DHCP, which most people are
You have two options;
First, properly setup the DHCP server that is giving your machine it's local IP address. If you use a router, go into the router's settings and make sure it is providing its clients (you), proper DNS servers.
If you are not using a router and get your DHCP directly from your ISP, call your ISP.
This is most likely the issue you have.
Second, solution if you can't do the first solution is to manually edit the connection rather than /etc/resolv.conf. Doing it this way should survive a reboot.
On the top panel, click on the network applet and go to Edit Connections. Choose the connection that you're having issues with and click Edit. On the IPv4 Settings tab, choose Automatic (DHCP) addresses only
and fill in the DNS servers you want to use.
This will restart the connection, only pulling an IP address, while still using the DNS servers you just specified.
