-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
google search console couldn't fetch sitemap but index is ok #417
Comments
Have you tried accessing some urls that are in your index file from the
public Internet?
What’s the url where your robots.txt is hosted or the url of the index?
…On Sun, Nov 6, 2022 at 2:04 PM MiroBabic ***@***.***> wrote:
I get couldn't fetch from gsc for sitemap files, but index is read fine.
When I put my sitemap to any validator, it shows it is ok.
this is my sitemap.rb
SitemapGenerator::Sitemap.default_host = "https://www.xxxxx.xxxxx"
SitemapGenerator::Sitemap.compress = false
SitemapGenerator::Sitemap.create_index = true
SitemapGenerator::Sitemap.create(:max_sitemap_links=>45000) do
[:sk, :en].each do |locale|
add root_path.to_s + locale.to_s
add "/#{locale}" + list_cities_path
add "/#{locale}" + invoices_path
add "/#{locale}" + orders_path
add "/#{locale}" + contracts_path
add "/#{locale}" + contractors_path
City.find_each do |city|
add "/#{locale}/city/#{city.slug_url}", :lastmod => city.updated_at
end
Contractor.find_each do |contractor|
add "/#{locale}/contractors/#{contractor.id}", :lastmod => contractor.updated_at
end
Invoice.find_each do |invoice|
add "/#{locale}/invoices/#{invoice.id}", :lastmod => invoice.updated_at
end
Order.find_each do |order|
add "/#{locale}/orders/#{order.id}", :lastmod => order.updated_at
end
Contract.find_each do |contract|
add "/#{locale}/contracts/#{contract.id}", :lastmod => contract.updated_at
end
end
# Put links creation logic here.
#
# The root path '/' and sitemap index file are added automatically for you.
# Links are added to the Sitemap in the order they are specified.
#
# Usage: add(path, options={})
# (default options are used if you don't specify)
#
# Defaults: :priority => 0.5, :changefreq => 'weekly',
# :lastmod => Time.now, :host => default_host
#
# Examples:
#
# Add '/articles'
#
# add articles_path, :priority => 0.7, :changefreq => 'daily'
#
# Add all articles:
#
# Article.find_each do |article|
# add article_path(article), :lastmod => article.updated_at
# end
end
what can I do to make it readable for google ?
—
Reply to this email directly, view it on GitHub
<#417>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAXJEVGOYOJDLYMZFYTHQ3WHATNXANCNFSM6AAAAAARYT7ADY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
yes, when I copy paste link from sitemap index for exact sitemap, it works ok you can check all here, all links works, robots, sitemaps |
Yes I'm able to access all the links fine as well. So I'm not sure what the issue is. The sitemaps look fine. Please be aware that all your Invoice, Contracts and Orders data is publicly accessible!! e.g. https://www.openstats.city/en/invoices. you should secure that ASAP to prevent PII exposure, or worse. At the very least someone could use that data phish those users and get them to click malicious links, knowing details of their interactions with your site. |
@kjvarga thanks, but thats ok, it is public data (opendata) and should be accessible to anybody to check where money flows. Thats all from opendata initiative to help with transparency how public money are spent |
haha oops I was worried! |
I think I saw this behavior as well. I re ran |
I see something strange in my rails app log
|
I get couldn't fetch from gsc for sitemap files, but index is read fine. When I put my sitemap to any validator, it shows it is ok.
this is my sitemap.rb
what can I do to make it readable for google ?
The text was updated successfully, but these errors were encountered: