Already enabled sitemap plugin but nothing is generated

PLEASE help us help you by writing a good post!

annotationeer.netlify.app

Problem is i already enabled the sitemap plugin. but nothing is generated. posts say to clear cache first then re-deploy.

but where is the clear cache? it is not available anymore.

also, if i manually upload a deploy with sitemap.xml, when it requests it it errors out saying it is sent as html, not xml.

@chitgoks See my response here:

Can you please provide a link to your site/sitemap? (So it can be checked.)

hi nathan. i will disable the sitemap plugins. i already uploaded a sitemap.xml file. it is in

https://annotationeer.netlify.com/sitemap.xml

if i check this in google search it says “Inspect a URL in the currently selected property or switch properties”

my site only contains an index.html, not much in it.

@chitgoks Are you still encountering an issue?

when it requests it it errors out saying it is sent as html, not xml

hi. it works now. what happened?
can you also please do the same with my other site?

https://ph-weather-and-earthquake-updates.netlify.app/sitemap.xml

@chitgoks I did nothing, (in fact I can’t do anything at all, I don’t work for Netlify), so if anything changed it will be whatever you did.

It sounds like you disabled the sitemap plugin and just used your own sitemap.xml file.

oh i thiought youre with them

originally i didnt use the plugin

i only tried it after the crawl didnt work

ill see if the crawl works this time

still same issue. google search cant fetch the site map.

Both your sitemaps are working fine. What you report is a Google issue than a Netlify one: Couldn’t fetch sitemap(s) - Google Search Central Community

is it mandatory to put the sitemap url inside robots.txt?

The content of my robots.txt is only

User-agent: *
Disallow:

That’s a Google/SEO question, not a Netlify question.

ok. the error looks clearer now. sitemap exists but when google search checks, it says unknown type.

could this be what i see in posts that it sees sitemap.xml as html instead of xml?

Please stop posting in multiple threads.

And the sitemap is being served as XML, not HTML.

hi hrishkesh. im trying to add _redirects file but it always gets appended once it reaches netlify. is there a way to have the system not do this and upload the filename as it is?

i did get the googlebot to search. but it always reads sitemap as html. weird.
Sitemap Type Submitted Last read Status
/sitemap Unknown Jan 15, 2024 Jan 15, 2024 1 error

Since _redirects gets renamed to _redirects.txt , i placed redirects and headers in netlify.toml instead, and it returns that error. does the toml file look ok? i specifically set the content type in the redirects portion

Sitemap

[[headers]]
for = “/sitemap.xml”
[headers.values]
Content-Type = “application/xml”

[[redirects]]
from = “/sitemap”
to = “/sitemap.xml”
status = 301
force = true
headers = {Content-Type = “application/xml”}

Hi, @chitgoks. That URL does return that content type when I test:

$ curl --compressed -svo /dev/null --stderr - https://ph-weather-and-earthquake-updates.netlify.app/sitemap.xml  | egrep '^(<|>)'
> GET /sitemap.xml HTTP/2
> Host: ph-weather-and-earthquake-updates.netlify.app
> User-Agent: curl/8.4.0
> Accept: */*
> Accept-Encoding: deflate, gzip
>
< HTTP/2 200
< accept-ranges: bytes
< age: 0
< cache-control: public,max-age=0,must-revalidate
< cache-status: "Netlify Edge"; fwd=miss
< content-type: application/xml
< date: Mon, 15 Jan 2024 19:19:30 GMT
< etag: "6fc942643265acd94de39446034d4c57-ssl"
< server: Netlify
< strict-transport-security: max-age=31536000; includeSubDomains; preload
< x-nf-request-id: 01HM7912EWWZTCZ1RWPKB9S2BS
< content-length: 530
<

yes. you are right. i have no clue why googlebot does not fetch it. maybe they block netlify sites. i gave up on this. all the things i did, there is no problem with netlify. googlebot just does not fetch the sitemap.

i even tried to host the sitemap from a different site. it works, and googlebot crawled it. but no pages were indexed. weird.