wget: unable to resolve host address

Here is a couple of errors that might occur in Ubuntu or Node.js running on ubuntu:

Command:

wget http://www.google.roCode language: JavaScript (javascript)
# response
wget: unable to resolve host addressCode language: PHP (php)

Or in node.js:

 { [Error: getaddrinfo ENOTFOUND] code: 'ENOTFOUND', errno: 'ENOTFOUND', syscall: 'getaddrinfo' }Code language: JavaScript (javascript)

I found the solution at: