WP Hive » Troubleshooting and How-To

Sitemap problems

(5 posts)

  1. wwday3
    Member

    I thought I had this figured out, but apparently not.

    I am using the Google XML Sitemap plugin. In the first entry I put in the absolute path to the stemap (....html/topdomain/wp-content/wp-hive/mydomain.info/sitemap.xml). In the second entry I put in the path that Google expects (http://mydomain.info/sitemap.xml). It seemed OK at the time.

    I submitted one of the sitemaps to Webmastertools, and went about creating a new domain. Today when I checked it at Google it had errors. It seems all of the new domains entries were in it. Upon further analysis, it appears both domains, even though set up like above, are having the same issue - looking at a sitemap in the top domain's root.

    I deleted the sitemaps from the wp-hive/domain.info folder and rebuilt manually. Ther are showing up there, but the redirect to the folder does not seem to be happening. Yes, I have the WP-Hive plugin activated in all domains.

    Posted 3 years ago #
  2. wwday3
    Member

    OK, so after adding a couple echo's to WP-Hive.php I see the problem. Those sitemap file must have inadvertently been created in the top domain's root. I guess it's a good idea to do the custom XML setup immediately following the activation of the plugin just to make certain no "root" sitemap gets created by accident.

    It would be nice if there was a way to prevent accidental sitemap redirection. Is there something that could be done there? I assume the way it works now is if the root sitemap is not found, somehow the wp-hive plugin takes over. Is there a way to "force" that? I noticed my echo's didn't fire off until after I deleted the rogue sitemap, so I don't know...

    Posted 3 years ago #
  3. wwday3
    Member

    Something's still not right. When I'm in the XML sitemap plugin and I click on the sitemap link I see the proper sitemap. However, when I click on the sitemap.gz link I get a garbage text document. I no longer have errant sitemaps in the root, so I'm really not sure what it's picking up. Both files seem to reside in the proper place, but I'm only reading one of them properly in my browser. (I deleted and re-created just to make sure).

    Isn't the gz sitemap the one that is automatically submitted to Google? Is this a problem? If Google tries to access the GZ file and gets a nonsense text document, that's a problem...

    Posted 3 years ago #
  4. wwday3
    Member

    OK, so I'm crazy I guess. I put a var_dump of $wp_query in the plugin to make sure the correct values were coming through. When I did that and clicked on the link it looked fine. So I commented out the var_dump, clicked again, and this time it prompted me to download the gz zipped file.

    Maybe I was still getting what was in the cache. I don't know...

    Posted 3 years ago #
  5. ikailo
    Developer

    If the file exists in the root, then the server will send that directly. If it doesn't exist, then .htaccess will take over and pass the query through index.php, which allows WP to do it's processing / rewrites.

    The garbage in the .gz file sounds to me like an incorrect content-type header, but I'm not sure if that would be caused by WP Hive. Perhaps it was a cache issue, but I'm not sure. Something to look into though.

    Posted 3 years ago #

RSS feed for this topic

Reply

You must log in to post.