Invalid sitemap URL

for Google Search Console, my sitemap has errors:

this is my sitemap:

What should I do to correct it?

1 Like

First step: let us know if you use your own sitemap template. If yes, then post it.
Second step: make the repository public so we can see what the issue is.

I think you might just have no baseUrl defined.

1 Like

no. I’m using the Hugo’s sitemap template.

Yes, as you could see from the repository, it’s set up like this: baseurl = "/"
how should it be instead?

Ps. is it worth adding these lines to the config.toml file?
changefreq = “monthly”
filename = “sitemap.xml”
priority = 0.5

how should it be instead? :wink:

I think the sitemap config you posted is the default configuration, so you can ignore those points. If you want to change them then put them into the config.

1 Like

I did not understand why in the sitemap there is this URL:
how can I delete it?

You have a file here:

Why would you expect it not to be included?

1 Like

You’re right. but why does the URL return 404 error?

It does not get created. I don’t really see why. It might be because your single.html and list.html in layouts/_default are empty. I would expect Hugo to throw some kind of notice about that or create empty files.

If you want the hide content that should exist from the sitemap you will need to create your own sitemap template, see the following link:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.