Another way to test this is to type in an IP address in your web browser. For example, if you type in http://22.214.171.124
and that takes you to Google, but http://www.google.com
does not, then you will know you need to change your DNS settings.
If you don't know what address to use for your DNS in /etc/resolv.conf, check your ISP's website. If you can't find it there, here
is a list of OpenNIC nameservers that you can use. Pick the IP addresses of servers from your country (for USA, they'll end with .us.opennic.glue, for Canada .ca.opennic.glue, etc.) and add lines saying "nameserver <ip address>" for each one you choose (up to three).
For example, if you were in the USA, you might add the following lines to /etc/resolv.conf: