How to Disable XML Styling in OSMap
One of our members was having trouble submitting his sitemap to Google. The message displayed at Google was:
"Your Sitemap appears to be an HTML page. Please use a supported sitemap format instead."
This tutorial will show you how to disable XML styling in OSMap, which should fix the issue. Let's get started.
Google wants the sitemap to be in one of the following formats:
- Google sites
Of the four, XML is most common. As you can see, HTML isn't on the list.
OSMap generates an XML version of a sitemap and an HTML version. The first one is used for search engines, while the second one is meant to be human readable.
Here's where it gets messy...
Browsers recently implemented a feature where you can turn XML files into a more human readable format. OSMap implements this feature by default. To a user, it appears sort-of like HTML. But its source code is XML.
Also, one of Joomla's legacy SEO features is the ability to add ".html" to the end of URLs.
When Google sees ".html" at the end of the URL and a prettified XML file, it results in a false-negative. It deduces that it's not an XML file when it actually is.
- Create a new Hidden menu item of type OSMap -> Sitemap XML Format:
- In the menu settings, set the "Add Styling" option to No:
Then submit the URL of that menu item and it should work in Google.
That's all there is to it. Congrats!