WordPress.org

Ready to get started?Download WordPress

Forums

All in One SEO Pack
[resolved] Sitemap Blank Page - Not Working With HTTPS (4 posts)

  1. apcpub
    Member
    Posted 4 months ago #

    I force ssl on wp-admin area using https (as everyone should) and have found that this causes the XML sitemap feature of all in one seo pack to break.

    While logged in using https I found that clicking "update sitemap" and then navigating to http://www.example.com/sitemap.xml resulted in a blank page. I tried viewing source and did see the sitemap but the url to the xml stylesheet is using https instead of http.

    From my source:

    <?xml version="1.0" encoding="UTF-8"?>
    
    <!-- Sitemap file 'sitemap' statically generated by All in One SEO Pack 2.1.4 by Michael Torbert of Semper Fi Web Design on Fri, 11 Apr 2014 22:18:23 UTC -->
    <?xml-stylesheet type="text/xsl" href="https://www.mysite.tld/wp-content/plugins/all-in-one-seo-pack/sitemap.xsl"?>

    So, if I then navigate to https://www.example.com/sitemap.xml I see the sitemap just fine, but I don't think I can submit https to google. The compressed version also contains the link to the xml stylesheet using https as well.

    I verified this by also temporarily reconfiguring things to login to wp-admin area insecurely using http and found the sitemap xml stylesheet does use http in the source.

    Is there a way to work around this for now? Logging in to update my sitemap using http is NOT an option. I am blown away by how many people still access wp-admin without SSL.

    https://wordpress.org/plugins/all-in-one-seo-pack/

  2. apcpub
    Member
    Posted 4 months ago #

    I found a patch that works for me for now.

    I replaced line 939 in aioseop_sitemap.php.

    Was:
    echo '<?xml-stylesheet type="text/xsl" href="' . $plugin_path . 'sitemap.xsl"?>' . "\r\n";

    replaced with:
    echo '<?xml-stylesheet type="text/xsl" href="' . str_replace("https","http",$plugin_path) . 'sitemap.xsl"?>' . "\r\n";

    Seems like it could work as a permanent fix. In the case that someone is logged in via http it still works. And, I can't see why someone would want to use an ssl link to their sitemap or the .xsl stylesheet in the sitemap anyway, though I guess there could be a special case.

  3. wpsmort
    Member
    Posted 4 months ago #

    Hi apcpub,

    We're currently looking into this because Google has changed their rules on submitting XML sitemaps for HTTP and HTTPS. We'll likely have new code out in the next release that accounts for Google's changes.

  4. apcpub
    Member
    Posted 4 months ago #

    OK, thanks.

Reply

You must log in to post.

About this Plugin

About this Topic