Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sitemap (XML) partially works on GitHub Pages and cannot be fetched by Google Search Console

I have a site with a custom domain hosted on GitHub Pages. I've added a sitemap file to my repository with the name sitemap.xml. I am able to access it by going to https://example.com/sitemap; however, https://example.com/sitemap.xml returns a 404 error.

Furthermore, when I try to add the aforementioned sitemap to Google Search Console, it cannot fetch it. I've tried both URLs and neither works.

I am not using Jekyll or any other framework. What can I do?

like image 538
Looky1173 Avatar asked Oct 23 '25 13:10

Looky1173


1 Answers

Adding a .nojekyll file to my repository solved the problem. I guess GitHub Pages assumed I was using Jekyll and incorrectly compiled my website.

like image 191
Looky1173 Avatar answered Oct 26 '25 14:10

Looky1173