I’ve come across this problem many times before where I’ll be fixing a computer and the internet works when using ip addresses but not hostnames. This is likely caused by a downed DNS server or incorrect settings. This post is more for my information, but it may serve someone in the future.
To get your public ip address without having to type in whatismyipaddress.com, just go to: http://18.104.22.168/. You’ll see a blank screen that just shows your ip address.
For testing purposes on a Windows machine, if you need to ping Google, use one of their ip addresses:
Also, as a quick check, make sure that the DNS service is running if you’re not on a corporate network (or any network where there’s a DNS server): type in services.msc into the Run command and check for DNS to make sure it’s started.