Issues with sitemap

Hello,

we created a sitemap, but when we try to open sitemap, we get following:
https://naucimo.se/sitemap_index.xml

Kindly asking for help.

Thanks,
naucimo.se

Hello @uroscarman,

Thanks for writing to us.

The issue generally happens due to the white space before the opening PHP tag and closing the PHP tag. Please ensure that you have not added any PHP code with white space or any plugin that is causing the issue. Alternatively please have a look at this article to learn more about how to fix it.
https://medium.com/@asce4s/fix-wordpress-sitemap-error-error-on-line-2-at-column-6-636dc5d534df

Thanks

Hello @prakash_s,

thanks. The issue was in blank space/line before <?php statement in wp-config file.
Everything is fine now. Thank you for your help.

Kind regards,
Naucimo.se

Hi @uroscarman,

Great that it is resolved now.

Thanks

Hi @tristup

the sitemap is still working, but now it seems that it can not be shown Google Search Console and we can’t index pages or posts on Google Search Console. We get a 404 error (page not found) .

The change we did last last time, was deleting the empty row in wp-config:

404 error for the sitemap:

404 error for all pages and blogs we try to index:

We’d appreciate some suggestion on how to resolve this.

Thanks,
naucimo.se

Hi @uroscarman,

I strongly believe that the issue you are currently having is not related to the changes you made in the wp-config.php. There might be something else behind it. I would suggest you go through the following article on the 404 issue.

Hope it helps.
Thanks

Hi @tristup,

thank you for looking into this. We try suggestions from article and get back to you.

Hi @uroscarman,

You are most welcome.

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