0

I am a Static User I write my all pages and sitemap with pure html css code, I have a question that in sitemap I am using http xmlns in order to make my sitemaps so is it allowed to add https or http is better that's why all are using it.

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">

So in the above I would like to ask that is it allowed to use https xmlns?

0
-1

One way to check whether or not putting https instead of http would be to try it in a browser.

I did that and they did work, so https is valid. But you should note that if you try http://www.sitemaps.org/schemas/sitemap/0.9 it redirects to https

3
  • Thank You so much for confirmation. Aug 6 at 5:58
  • 1
    The xmlns attribute defines the namespace for the XML document. It is a URI, which just so happens to look like a URL (in this case). This doesn't really have anything to do with HTTP vs HTTPS - it really is just a unique string. The Sitemap 0.9 protocol defines http://www.sitemaps.org/schemas/sitemap/0.9 as the namespace, so strictly speaking that is what should be used. Using https defines a different namespace, although in reality it probably doesn't matter (but some validators do throw an error if you use an https... namespace).
    – MrWhite
    Aug 6 at 10:39
  • "it redirects to https" - it also appends a trailing slash. (But XML parsers don't make a request to this URI.)
    – MrWhite
    Aug 6 at 10:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.