Qvatra
Qvatra

Reputation: 3857

sitemap xmlns and "charset" attribute

my first 2 lines of sitemap.xml are:

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

what does keyword xmlns do? What is it for? What should I type there for indexing in google.

Also I got warning in a validation results: Missing "charset" attribute for "text/xml" document.

what does it mean and how to correct it?

Upvotes: 0

Views: 2895

Answers (1)

Ron
Ron

Reputation: 1731

I believe the site you used to validate your sitemap is using the deprecated schema for sitemap.

<?xml version="1.0" encoding="utf-8" ?>
<sitemap xml:base="http://www.barbrastreisand.com/" lang="en" type="text/html" charset="iso-8859-1" xmlns="http://standard-sitemap.org/2007/ns"></sitemap>

The latest one uses:

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

Upvotes: 1

Related Questions