6 ms·
just checking the return code on a GET request. src is on github if you're curious. You're right though, looks like the domain lookups need a bit of work.
by trevorah 14y ago
just checking the return code on a GET request. src is on github if you're curious. You're right though, looks like the domain lookups need a bit of work.
- rajivm 14y agoYou should do a "whois" lookup for the domain. The return code for a 'get' request on the domain has no bearing on its availability -- many parked domains do not even have DNS configured, let alone HTTP.
- cbhl 14y agoI'd be wary of doing automated whois lookups, which might be considered abusive / against terms of service depending on which server you hit.
- trevorah 14y agoGood point. This doesnt sound like a quick fix.
- trevorah 14y agoVery true. This requires a little more work than my current hack. I'll see if there is a whois package for node...
- nwh 14y agoThe quickest way I've found is to do a DNS lookup, and if that fails, hit the WHOIS.