Comments (7)
Hi,
My guess is that is is an inconsistency between the forward and the reverse DNS records. Most likely Google dynamically and frequently updates the crawler's DNS records. So my theory is that sometimes the forward resolves correctly, but the reverse returns NXDOMAIN because it was not in the cache and hence the result is more up-to-date.
Does it make sense to you?
from legitbot.
Interesting. I have only a loose understanding of dns but I'd thought it'd propagate up to a master copy if it can't find a record?
Any tips how to solve it best in a rack-attack block? Or should it be fine to just rescue the exception?
from legitbot.
I'd thought it'd propagate up to a master copy if it can't find a record?
Yes. Local / closest DNS servers cache records. Consider your closest DNS server has a forward record in its cache and returns it. But it has to go further in the chain to get the result for a reverse query and gets NXDOMAIN in return, because it does not exist anymore.
from legitbot.
Does rescuing the exception seem like a decent plan, or does it open up other bots? Or should this be something rescued in the gem itself.
from legitbot.
Yes, rescuing the exception in a calling code might open the door for other bots. It should be rescued in the same way as for forward resolv:
legitbot/lib/legitbot/validators/domains.rb
Lines 51 to 55 in 4a98be8
from legitbot.
Published as 1.6.0
from legitbot.
Awesome, thanks!
from legitbot.
Related Issues (20)
- FacebookBot mislabeled as fake HOT 7
- Upgrade `create-pull-request` to V5
- Split Google crawlers into categories
- Valid bingbot detected as fake due to multiple DNS names
- DuckDuckGo Browser, identified as bot.
- Migrate from Travis CI to Github Actions
- Is API ready for 1.0 ?
- NoMethodError: undefined method `empty?' for nil:NilClass HOT 9
- NoMethodError: undefined method `index' for nil:NilClass HOT 5
- Does AppleBot still masquerate as GoogleBot? HOT 3
- Petalbot tests are failing
- Update the list of Oracle IPs
- New: Amazon / Yahoo
- iMessageBot HOT 1
- Automate the process of updating IPs
- Mock Resolv
- Facebook bot makes request as soon as gem is required HOT 3
- Add missing Google crawlers HOT 4
- Add support for GPTBot
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from legitbot.