Closed (won't fix)
Project:
XML sitemap
Version:
7.x-2.x-dev
Component:
xmlsitemap.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Feb 2010 at 10:57 UTC
Updated:
23 Oct 2019 at 23:14 UTC
Jump to comment: Most recent
Comments
Comment #1
dave reidI'm not sure how this could be done. Technically that's a 'separate' site from the Drupal site. I think your best way is to manually add that sitemap yourself from Google Webmaster Tools, Yahoo site explorer, etc.
Comment #2
KempJ commentedPerhaps it would be possible to have the option to select the external sitemap in the xmlsitemap admin area. Then generate the main sitemap as an index to the 'real' one and the external one (like when there's a lot of links in the 'real' one). Don't know how practical that would be though, do the child sitemaps need to have certain fixed names?
Comment #3
Anonymous (not verified) commentedI would suggest a new module with a name something similar to root_xmlsitemap. This new module would allow disparate sitemap.xml files to be indexed in a sitemap index file. There is nothing wrong with an indexed file being another index so if this module (xmlsitemap) creates more than one sitemap file it just works.
The problematic issue will be the name of the sitemap.xml file created by the root_xmlsitemap module. It might be necessary to allow the user to name the URI reference created by xmlsitemap so that root_xmlsitemap can create the common sitemap.xml name.
Comment #4
dave reidAck ack! The biggest thing to look at is that each XML sitemap should be though of as a separate site, so Drupal shouldn't have to handle anything with it. Especially with the upcoming changes of defining sitemap 'contexts', I can't see any non-ugly-hack way it could be done to get a non-Drupal sitemap listed from inside the Drupal sitemap.
The only place or way that I think we could add this is support for listing the sitemaps in hook_robotstxt() and when pinging to search engines.
Comment #5
Anonymous (not verified) commentedMy idea isn't to include an external sitemap in the xmlsitemap output but to create a new module that creates an index file containing all of the sitemap entries it is told about. The problem with the idea is that you either have a someothersitemap.xml name you give the engines or xmlsitemap allows the user to name the sitemap.xml to something else.
So root_xmlsitemap (if that is what the other module is called) would create a sitemap index xml file that points to the other possible sitemaps and rootsitemap.xml is given to the search engines as the sitemap.xml file and it contains index representations pointing to sitemap.xml and whatever.xml.
So if you want to consider the feature of allowing the user to name sitemap.xml something else, we can change the title and go with that else we set the status to won't fix and allow the OP or someone else to create the root_xmlsitemap module knowing the limitations. I do agree that xmlsitemap cannot include some other sitemap data.
Comment #6
dave reidWith the upcoming concepts of 'context' and having different sitemaps per language and domain, doing this feature becomes even more complex since we'd have to ensure for each sitemap generated that the external sitemaps are in a sub-path of that current sitemap. Plus we'd have to validate that the external sitemap isn't itself an index, although the specification is unclear if you can have an sitemap index, pointing to another index of sitemaps.
For now I'm going to leave this as postponed as it's not very high on my list and I've got to get the context code and UI finished first. After that I could see how if something like a root_sitemap is possible.
Comment #7
grahamshepherd commentedThanks for all the thoughtful comments. I hope that a way of doing it conveniently surfaces at some time. I appreciate the huge amount of work that has gone into this module and realise that my priorities aren't necessarily everyone else's.
Comment #8
dave reidTechnically you could possibly use the 'XML sitemap custom' sub-module and make the external sitemap a new custom link. I'm not sure what Google does when you link a sitemap from within another sitemap that is not an index itself.
Also, you could use the robots.txt (or the RobotsTxt module to add
Sitemap: http://shepsplace.net/SM_family.xmlso it gets auto-discovered by search engines.Comment #9
pifagor commentedComment #10
jwilson3See https://support.google.com/webmasters/answer/75712?hl=en
You have to create a sitemapindex following this syntax:
I would manually create this file in your projects web root at sitemapindex.xml
Then add in the files created by xmlsitemap module, plus any other custom sitemaps that you have. Then submit this new sitemapindex.xml to Google, and also add this file, plus the additional sitemaps to robots.txt (mentioned in previous comments).