How to fix the "Invalid tag value. This XML tag has an invalid value. Please fix it and resubmit." error when using the jekyll-sitemap gem.

After I installed the jekyll-sitemap gem on my Jekyll website and tried to register the generated sitemap in my Google webmaster account, I received from Google the following error:

Invalid tag value. This XML tag has an invalid value. Please fix it and resubmit.

I re-checked the generated sitemap.xml file of my Jekyll website and I found out that the priority values were wrong. The allowed range for this value is from 0.0 till 1.0.

The priorities that were generated from the gem where higher than 1.0. By fixing them directly in the sitemap.xml and retesting the file in Google webmaster I got no errors and the sitemap was submitted successfully.

comments powered by Disqus