9

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: protected function _prepareObject(array $data) { $object = new Varien_Object(); $object->setId($data[$this-...


8

Since Magento 1.9.0. you can do this without touching any core file. There are two new events you can observe: sitemap_categories_generating_before sitemap_products_generating_before To exclude products based on attribute, you can do this: add an observer to sitemap_products_generating_before app\code\community\My\Module\etc\config.xml <events&...


7

Out of the box, no, there's no way to exclude certain products from the sitemap generated by Magento's Catalog -> Google Sitemap feature. If I was going to go about doing this programmatically, modern versions of Magento (checked in the 1.7.x branch, this might be around in earlier/EE versions) use the following resource model class ...


6

The steps I ended up using were as follows, and the comments and answers so far got me started in the right direction. First I added a row to the "sitemap" table. Since we have multi-store set up, and because I want to keep my module store agnostic, I didn't hard code this INSERT into a MySQL migration, but just ran it on the store manually: INSERT INTO ...


6

Magento 2: By default not providing HTML Sitemap. Can use Free Extension: https://www.mageplaza.com/magento-2-seo-extension/ You have following options Use Plugin like http://www.mageworx.com/magento-2-sitemap-extension.html Create CMS Page & Put Links Make Custom Module to Generate HTML Sitemap Programmatically Use your Module/CMS Link to ...


6

Magento 2 doesn't have html sitemap url for category and products like in magento 1.xx . For this, you can create a CMS page like 'sitemap/' and call a phtml file which will include the custom code to call all category In cms page, call this: {{block class="Magento\Framework\View\Element\Template" template="Magento_Theme::sitemap.phtml" name="...


6

As of Magento version 2.1.8, the sitemap functionality is included in the admin by default. Define sitemap location: Marketing > SEO & Search > Site Map. You can also manually generate the sitemap file from here. Configure cron settings: Stores> Configuration > Catalog > XML Sitemap Here are instructions for setting up recurring cron jobs. Just like ...


5

You need to override the method Mage_Sitemap_Model_Sitemap::generateXml because Magento does not offer an event you can use for that. Insert your code after the cms pages are added This is the code that adds the cms pages to the sitemap: /** * Generate cms pages sitemap */ $changefreq = (string)Mage::getStoreConfig('sitemap/page/...


4

To address one of your initial comments: "I have set Product URL Suffix(html) and Category URL Suffix(html) in the configuration. This suffix are not showing in sitemap.xml." We noticed this bug introduced in EE 1.13. We requested a patch and received the following. I don't believe this is EE specific so hopefully it helps a bit. Also, just upgraded a ...


4

This is already native to Magento for both categories and products. Eg. For categories, http://me-d1.sonassihosting.com/catalog/seo_sitemap/category/ For products, http://me-d1.sonassihosting.com/catalog/seo_sitemap/product/


4

You can just generate the sitemap.xml per store. In your robots.txt add the path to the sitemaps, for example: # Sitemap Sitemap: http://www.yourdomain.com/sitemap/de/sitemap.xml Sitemap: http://www.yourdomain.com/sitemap/en/sitemap.xml


4

Take a look at how Magento generates it's sitemap.xml file. Specifically the Mage_Sitemap_Model_Sitemap class method generateXml. For example, following snippet generates them for the categories, I've rewritten it a little to export to a flat text file. $ioWrite = new Varien_Io_File(); $path = ''; $ioWrite->open(array('path' => $path)); $ioWrite-&...


4

Seems there is a thread where is mentioned the same query: https://community.magento.com/t5/Technical-Issues/cannot-generate-sitemap/td-p/41623 There is also ticket open with the same issue: https://github.com/magento/magento2/issues/8671 By looking the query then t2_name is not found therein joins. This is added to select in vendor/magento/module-...


4

Put your sitemap in the /pub/ folder: Then go to http://www.domain.com/sitemap.xml


4

Update: Yes, you can do that by creating plug on class Magento\Sitemap\Model\Sitemap. Create after plugin of collectSitemapItems() and add your custom URL to the collection. di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"...


3

This sounds like an execution time or memory limit issue. Please check your values on the server and try updating these via php.ini or .htaccess.


3

Magento 1.9.0.0. added two events to adjust product and category XML sitemap: sitemap_categories_generating_before sitemap_products_generating_before In Mage_Sitemap_Model_Sitemap::generateXml() they replaced foreach ($collection as $item) { with $priority = (string)Mage::getStoreConfig('sitemap/product/priority', $storeId); $collection = ...


3

To achieve this you can do the following -: Create an attribute against product i.e. exclude_from_sitemap (Yes / No) Overwrite Mage_Sitemap_Model_Resource_Catalog_Product class and modify getCollection function by adding filter to your new attribute i.e exclude from sitemap If you are not a developer then the following module can help achieving the above ...


3

To create a footer link add the following to your theme's layout/local.xml file (if it doesn't exist, create it): <default> <reference name="footer_links"> <action method="addLink" translate="label title" module="catalog" ifconfig="catalog/seo/site_map"> <label>Site Map</label> <url helper=...


3

Try this. Edit the app/design/frontend/your_package/your_theme/template/catalog/seo/tree.phtml file in your theme. Add an if condition just after the foreach loop which checks for activeness of the $_item. <?php $_items = $this->getCollection(); ?> <?php if($_items->getSize()): ?> <ul class="sitemap"> <?php foreach ($...


3

I verified this same issue exists on a separate project also running 1.13.1.0. Here is a more robust version of the above for anyone implementing this as a patch. This should be applied as a proper local rewrite of Mage_Sitemap_Model_Resource_Catalog_Category and Mage_Sitemap_Model_Resource_Catalog_Product, replacing instances of "category" with "product" ...


3

This is the way the default Magento sitemap generates. There are 3rd party extensions that will allow you to put all your pages in the sitemap, but by default, Magento doesn't like all of them.


3

You need to create rewrites in .htaccess: How to add sitemap.xml for multistore magento First, create a new folder called sitemaps in the root of your website, then create subfolders for each domain. /sitemaps/domain_1/ /sitemaps/domain_2/ Then login to the Magento admin and navigate to – catatlog -> google sitemap Create or edit the ...


3

How to remove home identifier from the homepage url inside the generated sitemap. (Tested on CE 1.9.3.4) Before: <loc>http://www.example.com/home</loc> After: <loc>http://www.example.com/</loc> Copy your Sitemap.php from: app/code/core/Mage/Sitemap/Model/Sitemap.php to: app/code/local/Mage/Sitemap/Model/Sitemap.php Look for:...


3

Please do not just copy the complete file to app/code/local (as mentioned in the other answer here). This is not upgrade safe and will cause some extra work when upgrading. It's better to create a seperate module for this, for example YourNamespache_Sitemap with a proper rewrite of the model Mage_Sitemap_Model_Sitemap there. In your config.xml put the ...


3

If you have enabled a sitemap through the Catalog configuration and one is not generating on the schedule - make sure you've also set one up in the Marketing panel! Marketing > [SEO & Search] Site Map You must have created a sitemap in that portion of the admin in order for a sitemap to be generated by the configuration.


3

etc/di.xml <preference for="Magento\Sitemap\Model\Sitemap" type="VendorName\ModuleName\Model\Sitemap" /> Model/Sitemap.php namespace VendorName\ModuleName\Model; class Sitemap extends \Magento\Sitemap\Model\Sitemap { protected function _initSitemapItems() { parent::_initSitemapItems(); $newLine = []; $object = new \...


3

The reason is the way getBaseUrl function implemented on Magento\Store\Model\Store. public function getBaseUrl($type = UrlInterface::URL_TYPE_LINK, $secure = null) { ... case UrlInterface::URL_TYPE_MEDIA: $url = $this->_getMediaScriptUrl($this->filesystem, $secure); if (!$url) { ...


2

I haven't tested in Enterprise 1.13 but my extension works great for the community editions of magento and should work with EE as well. To test your problem I created a parent category called "Test"...disabled it. Created a sub-category called "test-subcat" and have it enabled with .html suffix enabled for category urls. I can confirm that the .html ...


2

You can avoid the listing of all product in your 'small' websites by removing the unnecessary products from those websites. When you edit a product you have a tab called Websites. If a product is not set to appear in one of the websites, it won't appear in the sitemap either. I assume you have more than a few products in your website so editing each one ...


Only top voted, non community-wiki answers of a minimum length are eligible