: Sitemap.xml file extension, does it have to be .xml? Do XML sitemap files have to end with the .xml file extension? On the Bigcommerce platform, their XML sitemap file are defined as: http://www.examplesite.com/xmlsitemap.
Do XML sitemap files have to end with the .xml file extension?
On the Bigcommerce platform, their XML sitemap file are defined as:
www.examplesite.com/xmlsitemap.php
The sitemap file is all correctly marked up and and when saving locally its saves as an .xml file. I've also seen some Joomla sitemap plugins create sitemaps with .php extensions.
The Sitemap Protocol site doesn't cover this.
I unfortunately don't have access to GWT too see if it verifies.
More posts by @BetL925
2 Comments
Sorted by latest first Latest Oldest Best
I gzip my sitemap to mymap.xml.gz and it works fine when I declare it so in my robots.txt. If you have a Google Webmaster Tools (GWT) account, GWT will tell you if there is any issue with your sitemap.
So, no, the extension does not have to be .xml.
It has been verified that a PHP file can be used as a sitemap file such as sitemap.php
I checked sitemaps.org (the website with the specification information for sitemaps) and there is no mention that the file must be saved in the .XML format. I will have to say that yes, it will work, as long as Google does not have a problem with the extension for some reason.
When you go through Google Webmasters Tools and click on submit/test a sitemap you are prompted with your site's root directory example.com/ immediately followed by a text field you can enter any file name and extension into; with no file extension forcing you to use an actual "XML" file here I'm assuming that you can use a sitemap with a .PHP extension.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.