Replies: 2 comments 3 replies
-
Funny you should mention this. I've also implemented a slightly more general reverse DNS lookup implementation: https://www.npmjs.com/package/reverse-dns-lookup const reverseDNSLookup = require('reverse-dns-lookup');
const isGoogleServers = await reverseDNSLookup(ip, 'google.com', 'googlebot.com'); I feel like this should be complementary functionality. You can read in the readme https://github.com/omrilotan/isbot#clarifications:
This package has not set out to verify bots, only to recognise (happy flow, I guess). I don't think I'll start maintaining IP address lists and DNS provider names. Verification is a security matter, it should be under better scrutiny than I'm able to provide. I'll try to make this point clearer in the readme. |
Beta Was this translation helpful? Give feedback.
-
Just released a more sustainable version (2.0.0) of my other package, you can use that instead of all these specific ones if you want to maintain the domain list: https://www.npmjs.com/package/reverse-dns-lookup const { verify } = require('reverse-dns-lookup');
const { getClientIp } = require('request-ip');
const crawler_domains = [
'.google.com', '.googlebot.com',
'search.msn.com', // Bing
'.applebot.apple.com',
'.twttr.com', // Twitter
'.crawl.baidu.com' // Baidu craler
];
const isCrawlerServer = await verify(clientIp, ...crawler_domains); |
Beta Was this translation helpful? Give feedback.
-
add a feature for dns verification as per
Verifying Googlebot
Not sure if this is possible on all bots.
but here is an implementation for google
https://www.npmjs.com/package/googlebot-verify
https://github.com/jcowley/googlebot-verify/blob/b30ad73ae6e7ca8936b7a45e885148fdf1072c49/index.js
Beta Was this translation helpful? Give feedback.
All reactions