Hi!

I have a question..

If you take a look at my sitemap at www.apartmentinrio.net/sitemap.xml, you will find two sites with same content (my front page)

http://www.apartmentinrio.net/vacation-rental-apartments-rio-de-janeiro
http://www.apartmentinrio.net/

I have created http://www.apartmentinrio.net/vacation-rental-apartments-rio-de-janeiro and this work as my frontpage, I have tried to exclude this site by changing from Included to Excluded on the edit page for this node.

Is this a bug or my way of creating a front page wrong?

Please let me know!

Thank you for a great module!

Comments

Anonymous’s picture

Assigned: prisonbreaker82 » Unassigned
Status: Needs review » Closed (works as designed)

You need to install the Global Redirect module. One issue with Global Redirect that has been given in the issue queues is that the module weight for XMLSitemap comes before Global Redirect which is too late for XMLSitemap. I suggest the Utility module to help change the module weights.

Note "by design" means that the module works as expected within the Drupal framework. It is the Drupal framework that allows the dual paths.

manuel garcia’s picture

I am seeing this problem also. I have changed the weights of the modules, Global Redirect now has a weight of 5, XML sitemap has a weight of 1, and XML sitemap engines a weight of 2.

We stil see a duplicate entry for the frontpage.

I realy doubt this a global redirect vs. xmlsitemap issue, for if this was the case, we would see duplicate entries for all node entries as well, and this isn't the case, node entries in the sitemap are correctly showing the path aliased url, not node/NID.

Perhaps I am wrong though, I havent looked under the hood of xmlsitemap, if so... perhaps we can turn this into a support request?

Anonymous’s picture

You'll have to determine what is causing xmlsitemap to see the front page twice. Xmlsitemap uses standard Drupal API for determining the path of a link. So it has to be a user environment issue and cannot be resolved by xmlsitemap coding.

Benj’s picture

Am I having this issue as well? Numerous xml entries on my sitemap pages are double. I haven't been able to figure out why some are and some aren't. And the only reason I know some are double is that they're next to each other. For all I know there could be more.

Is this essentially a problem when search engine's look at it? And what about throwing a check into this module to prevent repeats?

rkendall’s picture

Category: bug » feature
Priority: Critical » Normal
Status: Closed (works as designed) » Active

I don't think this should be "works as designed". In which case I suggest this as a feature request.

Some Drupal websites use a listing of content on the front page (this is the default Drupal setting ), while others make use of Drupal's ability to set a specific page to be the front page.

It may be the case that Drupal allows you to access the same content via both the front page and another URL, but this should not mean that the same content should be listed twice in the XML Sitemap.
(I do use Global Redirect, but websites should not be submitting a URL to search engines only to redirect them).

We can check paths in the sitemap against variable_get('site_frontpage', 'node') and then exclude if there is a match.
Refer: http://api.drupal.org/api/drupal/includes--path.inc/function/drupal_is_f...

Thanks.

akshita’s picture

Can you please let us know whether your issue is resolved?

I have a problem with my sitemap (double entries and the duplicated entry is having many empty values)

Any help is appreciated.

Thanks

Mac Lake’s picture

On the website I have made with Drupal I have many double entries in sitemap.xml, because I activated entries for both menus and content. Most of the pages are simple pages linked in the menu, so for most pages I get two entries, btw. only the content entries have a change date in the sitemap, not the menu entries.

I can’t just switch of one of these two (menu or content), because some pages like the homepage, contact and fullcalendar can have entries generated only via menu, while the imprint and possibly more pages in the future are not linked in the menu but with other links, so they only get sitemap entries via content.

So I can either allow double entries (is it really a problem?) or disable either entries via menu or content and manually enable single entries that are not covered automatically.

Anonymous’s picture

@Mac Lake: I'll suggest you disable the xmlsitemap_menu module and use the xmlsitemap_custom module to add your links. The double entries are likely to get you penalized by the Google gods.

rphair’s picture

Issue summary: View changes

I ran into this problem immediately; our site is also set to use a node URL as the home page. We are using the XML sitemap node module and we had the front page node appearing in the sitemap twice: as both its alias URL and the home page. This was fixed by editing the front page node and setting Excluded in its XML Sitemap section.

So I can confirm this feature has been provided in xmlsitemap_node in 7.x, maybe helpful to new visitors that are looking up the same issue. The problem also looks like it's fixed for xmlsitemap_menu (no duplicate under these conditions), no need to use xmlsitemap_custom.

gobinathm’s picture

Status: Active » Closed (works as designed)

@rphair comment #9, seems to confirm that this works fine with D7 version.

As D6 is in EOL, I believe there won't be any support / fix for a problem identified in 6x going forward. Given the fact that D6 is already EOL. Hence i guess this issue can be closed.

Changing the status, if incorrect pls revert the status.