Jetpack sitemap error on mapped domain

Having an issue with Jetpack sitemap and Domain Mapping on all the sub-sites in my network. Jetpack generates the sitemap urls but they point to the old sub-domain, instead of the mapped domain.

That seems to cause a console error when viewing the sitemap via the mapped domain url:
"Unsafe attempt to load URL http://subsite1.domain.com/sitemap-index.xsl from frame with URL http://subsite1.com/sitemap.xml. Domains, protocols and ports must match."

If accessed through the sub-domain(subsite1.domain.com/sitemap.xml), there's no error and the sitemap displays.

  • Adam Czajczyk
    • Support Gorilla

    Hello Sean

    I hope you're well today and thank you for your question!

    We've been testing that on our test sites and I think I can confirm that there's an issue. I'm not sure whether it's actually a JetPack bug (or a "not-so-good-development-decision") since Yoast is producing proper sitemaps or if it's a Domain Mapping breaking that but I believe we need to get our developers involved in it.

    I have already filled a report for them so they could check it and look for a fix or some "compatibility layer". Please note: since that's a complex issue and involves a 3rd-party plugin, it might take them some time to diagnose and solve that so I'd appreciate some patience on this.

    Please keep an eye on this ticket for further information.

    Kind regards,
    Adam

  • Adam Czajczyk
    • Support Gorilla

    Hello @seanf1!

    I apologize for keeping you without any update but I'm afraid I don't have any "solid" news on that yet. I have just pinged our developers asking them how's that going with a fix/solution so hopefully they'll provide us with some more specific information soon.

    Kind regards,
    Adam

  • Predrag Dubajic
    • Support

    Hi Sean,

    I'm afraid that we don't have any good news yet, our devs are still looking into this together with some other reports.

    The ticket linked is way back from 2011 and it's related to SmartCrawl plugin, so I don't believe these two are related but I will forward that to devs to check it out.

    Best regards,
    Predrag

  • Leonidas
    • Developer

    Hello there Sean ,

    We've been looking into the reported issue with the Jetpack-generated sitemaps and we indeed have identified some conflict points between the two plugins.

    To make sure we'll cover all bases and scenarios, could you share with me some of the configurations in your Domain Mapping plugin in the multisite in question?

    When in the network administration, at the Settings->Domain Mapping page, could you share with me the options selected for Administration mapping and Login mapping (domain entered by the user, mapped domain, original domain)?

    Also, when in the subsite administration, at the Tools->Domain Mapping page, could you share with me the options selected for Front end redirect should be: (Disabled and entered domain should be used, Directed to mapped (primary) domain, Directed to original domain)?

    Issues originated from conflicting code from two plugins, one of which is a third-party one, their replication and final resolution can be somewhat trickier than usual. That's why I'd like to thank you for your patience and cooperation in this and hope we come up with a solution really soon.

    Best regards,
    Leonidas

    • Sean
      • Design Lord, Child of Thor

      Hello. They are both set to "domain entered by the user ". For the sub site settings, it is set to "Directed to mapped (primary) domain".

      Some of these were switched and switched back when testing this issue.

      Thank you.

  • Leonidas
    • Developer

    Hi there again Sean :slight_smile:

    I was eventually able to reproduce your exact issue with a fresh WP install and have to report the following:

    1. Initially, as you said, I was getting the Unsafe attempt to load URL http://subsite1.originaldoma.in/sitemap-index.xsl from frame with URL http://mapp.ed/sitemap.xml. Domains, protocols and ports must match., when I tried to access the sitemap via the mapped domain's admin.

    2. Then, in the mapped domain's admin (lets call it mapp.ed) I toggled with the Generate XML sitemaps option
    Toggling the option off and then on, seems to do the trick for me.

    3. After that, I clicked on the sitemap link and I got to http://mapp.ed/sitemap.xml without problems.

    4. On http://mapp.ed/sitemap.xml, I then clicked on the http://mapp.ed/sitemap-1.xml where I could see the produced sitemap, again with no problems.

    5. What is more and just to make sure, I submitted http://mapp.ed/sitemap-1.xml to my Google Webmaster Console and the existing pages were normally submitted

    So, could you try steps 2-5, preferably in an incognito window, to avoid cache messing up our conclusions, and let me know if that fixed it for you as well?

    Best regards,
    Leonidas

  • Leonidas
    • Developer

    Hi there Sean ,

    about the simple sitemap plugin, since we have a natural successor for it in Smartcrawl (https://premium.wpmudev.org/project/smartcrawl-wordpress-seo/), the plugin hasn't been updated since 2012, so these kind of inconsistencies are to be expected. You are welcome to try configuring your site with Smartcrawl though, since it is a modern, powerful SEO plugin with much more support than the simple sitemap plugin and we haven't had any reports for conflicts with its sitemap process and Domain Mapping.

    About the Jetpack issue, since toggling it on/off did the trick on our setups, I'd like to ask you to activate/deactivate Jetpack itself and try again.

    If even this doesn't make it work, I'd need to closely look into your specific setup in order to further debug your issue. You can give me WP and FTP access for this, but since this is a public post you can do so in the following way:

    NOTE: Please make a full backup of your site before sending the following information.

    Please visit the Contact page and complete the form with the following information:

    https://premium.wpmudev.org/contact/#i-have-a-different-question

    Option: I have a different Question

    Subject: "Attn: Leonidas Milosis"

    In the Message box, please provide the following:

    - link back to this thread for reference
    - any other relevant urls

    - WP Admin login:
    Admin username
    Admin password
    Login url

    - Hosting Control Panel Login
    Admin username
    Admin password
    Login url

    ~OR~

    - FTP credentials
    host
    username
    password
    (and port if required)

    Best regards,
    Leonidas

    • Sean
      • Design Lord, Child of Thor

      I understand there is a new plugin, but by removing the Simple Sitemap Plugin we get that "Missing Plugin" notice. Deleting the plugin from the directory also causes the issue, so I get that the plugin is no longer supported, but we are technically not using it, it just left an error message that we can't seem to remove. Could you assist with that?

      Unfortunately this site is live with many customers in it, so we can't use for this.

      I will try to activate/deactivate Jetpack.

  • Predrag Dubajic
    • Support

    Hi Sean,

    As Leonidas was able to get this working on his installation by using the above-mentioned steps we would need to investigate your site further to check what else might be causing issues on your specific installation.

    Since you can't give us access to site, as it's a live installation, can you please create a staging site and provide access to that so we can check this further.

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.