I recently did some changes to my sitemap because i updated my website to support two languages but now i get an error when submitting the sitemap and i don't see where the problem is.
Your Sitemap or Sitemap index file does not properly declare the namespace.
> Examples
> Line 5
> Parent tag:
> url
> Tag:
> link
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/TR/xhtml11/xhtml11_schema.html" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd http://www.w3.org/TR/xhtml11/xhtml11_schema.html http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd">
<url>
<loc>https://example.com/</loc>
<xhtml:link rel="canonical" href="https://example.com/"/>
<xhtml:link rel="alternate" hreflang="el" href="https://example.com/"/>
<xhtml:link rel="alternate" hreflang="el-GR" href="https://example.com/"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/"/>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/en"/>
<lastmod>2020-02-25T12:41:35+00:00</lastmod>
<priority>1.00</priority>
</url>
````````
</urlset>
***Update
Tried this method like the Google Documentation says so
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
Although when using xmlns:xhtml="http://www.w3.org/1999/xhtml"
converts the xml to plain text, changing http
to https
outputs the xml correctly and does the work but i have read you must use only http
to avoid my issue, honestly this it too confusing.