title: Nodejs - DNS.Lookup is Rejecting URLs with HTTP?
body: <p>I'm trying to build an Api in Nodejs that takes a URL and checks that it's a valid website.</p>
  
  <p>Right now the dns.lookup rejects any invalid URLs (fake websites), and accepts any valid URLs as long as they don't start with HTTP:// or HTTPS:// . That's problematic because valid URLs are being rejected.</p>
  
  <p>So this URL produces the "No Errors" message:</p>
  
  <pre><code>dns.lookup('www.google.ca', function onLookup(err, address, family) 
    if (err == null) {
      console.log ('No Errors: ' + err + ' - ' + address + ' - ' + family) 
    } else {
      console.log ('Errors: ' + err + ' -- ' + address + ' -- ' + family)
    }
  });
  </code></pre>
  
  <p>And this URL with HTTPS produces the "Errors" message:</p>
  
  <pre><code>dns.lookup('https://www.google.ca/', function onLookup(err, address, family) 
    if (err == null) {
      console.log ('No Errors: ' + err + ' - ' + address + ' - ' + family) 
    } else {
      console.log ('Errors: ' + err + ' -- ' + address + ' -- ' + family)
    }
  });
  </code></pre>
  
  <p>The console.log output:</p>
  
  <p><em>Errors: Error: getaddrinfo ENOTFOUND <a href="http://www.google.ca/" rel="nofollow noreferrer">http://www.google.ca/</a> -- undefined -- undefined</em></p>
  
  <p>Is there a way to configure the dns.lookup to accept URLs that start with HTTP or HTTPS?</p>