statamic / seo-pro

An all-in-one site reporting, metadata wrangling, Open Graph managing, Twitter card making, sitemap generating, turn-key addon for Statamic.
https://statamic.com/addons/statamic/seo-pro
53 stars 36 forks source link

Add missing markup to fix Google Search Console Error #290

Closed jimblue closed 1 year ago

jimblue commented 1 year ago

As documented on www.sitemaps.org, sitemaps XML format should respect the following markup:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url></url>
<url></url>
<url></url>
...

But sitemap generated by Seo-Pro extension looks like this:

<urlset>
<url></url>
<url></url>
<url></url>
...

And because of this missing markup Google Search Console returns the following error:

Screenshot 2023-09-13 at 00 58 03

jasonvarga commented 1 year ago

Have you customized the template? Ours has both xml header and xmlns attribute on the urlset tag.

https://github.com/statamic/seo-pro/blob/master/resources/views/generated/sitemap.antlers.html

jimblue commented 1 year ago

Thank you for the hint, I found that the problem is due to my own setup (my HTML compress middleware...) Sorry for noise 😅

jasonvarga commented 1 year ago

Ah, good to know!