Raspberrypi unable to resolve hostname

I installed HASS on a raspberrypi using hassbian. Now I’m trying to setup Let’s Encrypt for remote access, but for some reason it can resolve the hostname of the certbot (e.g. dl.eff.org). And it can’t resolve any website IP address.

If I enter ping -c 1 8.8.8.8 it works, but ping -c 1 www.google.com does not.

I added dns-nameservers 8.8.8.8 8.8.4.4 to the /etc/network/interfaces but no luck.

Any ideas?

Thanks.

Did you reboot? Check /etc/resolv.conf. That’s where the info from dns-nameservers gets translated to.

1 Like

Rebooting after changes to DNS is extremely important as this info is cached at start up.

Yes, I did reboot

And are you finding your correct nameserver in /etc/resolv.conf as mentioned by @bbrendon?

I did have the correct nameserver, I finally gave up, and started my installation again from scratch.