Google search console said sitemap is Unsupported file format

I’m using hugo + github page to build my blog. In github, I set the blog to built from the gh-pages branch.
I want to use custom sitemap.xml. So I put my sitemap.xml in layouts/_default/ and /static folder.
First I use sitemap.xml begin with {{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}, and I could open it in web.
but in google, It always said, Unsupported file format.
Could you please help this issue? Thanks!

My site maps starts with <sitemapindex xmlns="">.

Your starts with <urlset xmlns="" ...

May be check your syntax

1 Like

compare with my samples

    home                  = [ "HTML",  "SITEMAP"]
    section               = [ "HTML", "SITEMAP" ]

Must call from HOME and SECTION

1 Like


A sitemap and a sitemap index are two very different things. The OP is creating a sitemap.


There is no need to specify an output format. By default, a sitemap.xml file is created in the root of the publish directory.

There is no reason to place it in static directory. It will be overwritten when layouts/_default/sitemap.xml is rendered. Run hugo --path-warnings and it will inform you of the duplicate target path.

Where in Google? Please post a screen capture.

1 Like

Thank you for the answer, I’ll have a try.

Thank you for the reply, I’ll try.

Thank you for the reply, I’ll try.

This is the screen shot, still got an error. But, Google send an email said everything worked and I can find my blog using Google search. @jmooring

If you click on the red error you will see more detail.

Actually, I have seen it before I ask help in the forum. Google console just the format error but nothing else.

However, It works with the ‘error’. So, Thank you for the help!! @jmooring


My guess is that the culprits might be the unicode characters in the sitemap, which are confusing google search console, for example you have:

which is translated by hugo into: