I'm getting ready to launch my first client project using next.js and I've fallen at the last hurdle. I have an obscenely simple .xml sitemap in my next.js project and google is not accepting it error from google search console is "unsupported file format"
<xml version="1.0" encoding="UTF-8">
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://jeannette-skibbe.berlin/</loc>
<lastmod>2022-05-05</lastmod>
</url>
<url>
<loc>http://jeannette-skibbe.berlin/contact</loc>
<lastmod>2022-05-05</lastmod>
</url>
<url>
<loc>http://jeannette-skibbe.berlin/about</loc>
<lastmod>2022-05-05</lastmod>
</url>
<url>
<loc>http://jeannette-skibbe.berlin/portfolio</loc>
<lastmod>2022-05-05</lastmod>
</url>
</urlset>
</xml>
I copied the sitemap structure from the next.js docs and the sitemap is reachable under https://jeannette-skibbe.berlin/sitemap with the sitemap being in the "/local" file.
Please help a girl out x
Update:
Solved issue at last. amended code below.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://jeannette-skibbe.berlin/</loc>
<lastmod>2022-05-05</lastmod>
</url>
<url>
<loc>http://jeannette-skibbe.berlin/contact</loc>
<lastmod>2022-05-05</lastmod>
</url>
<url>
<loc>http://jeannette-skibbe.berlin/about</loc>
<lastmod>2022-05-05</lastmod>
</url>
<url>
<loc>http://jeannette-skibbe.berlin/portfolio</loc>
<lastmod>2022-05-05</lastmod>
</url>
</urlset>
Essentially I was unfamilair formatting the xml seems that the ? merks in opening line act as a self closing element.