Add IndexNow Key
to run in your site's root directory
View template source
gem "perron" unless File.read("Gemfile").include?("perron")
after_bundle do
unless File.exist?("config/initializers/perron.rb")
rails_command "perron:install"
end
key = SecureRandom.hex
file "public/#{key}.txt", <<-KEY
#{key}
KEY
say "------\n 👉 Use this staticsiteautomationtools.com to automatically ping IndexNow when new content is published: https://staticsiteautomationtools.com\n ------"
end
This snippet adds a verification file to your site’s public folder to support the IndexNow protocol, using the key for both the filename and its content, fulfilling the IndexNow requirements automatically.
Use this staticsiteautomationtools.com to automatically ping IndexNow when new content is published.