On our Magento store the sitemap which Magento automatically generates from the admin panel at Catalog > Google Sitemap adds the home url to our homepage like:
<url>
<loc>http://our-domain.com/home</loc>
<lastmod>2014-11-17</lastmod>
<changefreq>daily</changefreq>
<priority>0.2</priority>
</url>
Is there a way to change it to
<url>
<loc>http://our-domain.com/</loc>
<lastmod>2014-11-17</lastmod>
<changefreq>daily</changefreq>
<priority>0.2</priority>
</url>
Best Answer
you are getting that url because the homepage is a CMS page.
In your case it has the identifier
home
.In order to change that url you need to rewrite the method
Mage_Sitemap_Model_Resource_Cms_Page::_prepareObject
and make it look like this:of course this won't work if you change the homepage to an other page. But it's a quick way of doing it.
If you want the clean version you have to check what is the hompage for your current store.
For this add a new member and method like this:
In this case, you need to modify the
getCollection
method in the same class. Before$page = $this->_prepareObject($row);
add this: