Sha256: 30935ee6a7784dada89422a160217ad54217aa13cd58a4fd1ffa1ce65bf40b97

Contents?: true

Size: 381 Bytes

Versions: 11

Compression:

Stored size: 381 Bytes

Contents

module Legitbot
  # https://support.google.com/webmasters/answer/1061943
  # https://support.google.com/webmasters/answer/80553

  class Google < BotMatch
    ValidDomains = ["google.com.", "googlebot.com."]

    def valid?
      subdomain_of?(*Google::ValidDomains) && reverse_resolves?
    end
  end

  rule Legitbot::Google, %w(Googlebot Mediapartners-Google AdsBot-Google)
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
legitbot-0.3.2 lib/legitbot/google.rb
legitbot-0.3.1 lib/legitbot/google.rb
legitbot-0.3.0 lib/legitbot/google.rb
legitbot-0.2.7 lib/legitbot/google.rb
legitbot-0.2.6 lib/legitbot/google.rb
legitbot-0.2.4 lib/legitbot/google.rb
legitbot-0.2.3 lib/legitbot/google.rb
legitbot-0.2.2 lib/legitbot/google.rb
legitbot-0.2.1 lib/legitbot/google.rb
legitbot-0.2.0 lib/legitbot/google.rb
legitbot-0.1.2 lib/legitbot/google.rb