Sitemap 301 redirect not liked by Google

I am using ZenPhoto ver. 1.4.1.2 [7933] and have enabled the Sitemap plugin. I generated the Sitemap which is at http://natureinfocus.com/sitemap.php. Google Webmaster Tools likes all the entries except for /ga​lle​rie​s/c​ach​e_h​tml​/si​tem​ap/​sit​ema​p-z​enp​hot​o-i​nde​x.x​ml which reports a 301 redirect:

URLs not followed
When we tested a sample of URLs from your Sitemap, we found that some URLs redirect to other locations. We recommend that your Sitemap contain URLs that point to the final destination (the redirect target) instead of redirecting to another URL.

Is there something I can change in Zenphoto or .htaccess file to fix this?

Comments

  • acrylian Administrator, Developer
    Are you sure you are using the correct plugin? The sitemap is actually called by <path to your zenphoto>/index.php?sitemap. There is no sitemap.php file at all anymore and not needed. So probably that is what causes your issue.

    The current sitemap generates a sitemap index file that points to sub sitemaps following the official sitemap specification. All sitemap files are indeed cached as static xml files within /cache_html/sitemap.
  • The extended sitemap docs say

    The sitemapindex file can be referenced via "www.yourdomain.com/zenphoto/index.php?sitemap" or with modrewrite "www.yourdomain.com/zenphoto/?sitemap".

    I've tried:
    natureinfocus.com/galleries/sitemap.php
    natureinfocus.com/galleries/?sitemap
    natureinfocus.com/galleries/index.php?sitemap

    All seem to generate the same sitemap like you described with links to xml files in the cache.

    Since I've enabled mod rewrite in zenphoto I assumed I should use one of the first two?

    Regardless of the sitemap used, if you go to http://web-sniffer.net/ and test http://natureinfocus.com/galleries it shows a 301 redirect.
  • acrylian Administrator, Developer
    As said natureinfocus.com/galleries/sitemap.php cannot work with current Zenphoto releases as there is no such page anymore and the plugin will not care for it as well (it once had but then there was no index sitemap file at all).

    Anyway, at least for http://natureinfocus.com/galleries it is the missing / at the end. So if the links complained about are indeed album links then we need to change internals as we probably need to add the trailing slash there directly.
Sign In or Register to comment.