首页 > 解决方案 > Google says: Sitemap.xml is HTML

问题描述

So I have been having a war with Google these last couple of days.
I created a sitemap (which is generated dynamicly) and routed to it using reverseproxy in nginx.
Happy with myself i uploaded the url too Google search console.
I got an error right away as seen in the picture. "Sitemap is HTML"

enter image description here

After digging around a while it appeared our pre-renderer had picked up the request and served google a pre-rendered version of the xml file, thus in html.
But even after fixing this, making sure no request for sitemap.xml goes to our pre-renderer google still, gives the same error message.
I have tried removing it and adding it again in search console multiple times on different days, i have tried waiting, I have tired serving it with another name (sitemap2.xml), and I have tried adding an actual xml file instead of the dynamic one. Nothing works!
I have verifed the xml file after i disabled the pre-renderer on multiple other sites and every one gives me an ok.
It's as though it's ignoring my requests to re-check the file.

Sitemap location: https://www.tirex.se/sitemap.xml

Any tips at this point would be much appriciated!

标签: sitemapgoogle-search-console

解决方案


推荐阅读