Sitemap empty on www url version (Unsafe attempt to load URL error)
-
Hi there,
I have an issue with the sitemap, when it shows correctly on non-www versions of the site, but does not show on the www versions (Google Search Console cant read the sitemap).
The default web url is https://example.com.
The sitemap works on:
https://example.com/sitemap_index.xml
https://example.com/sitemap_index.xmlThe sitemap does NOT work on:
https://www.example.com/sitemap_index.xml
https://www.example.com/sitemap_index.xmlThe error is always the same: “Unsafe attempt to load URL https://example.com/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl from frame with URL https://www.example.com/sitemap_index.xml. Domains, protocols and ports must match.”
I have seen this post (https://www.ads-software.com/support/topic/yoast-sitemap-with-2-subdomain-website/) and your suggestion to use the filter “wpseo_stylesheet_url” to change the css url, but the filter does not run on the pages with the error – it only runs on pages, when the xml sitemap loads successfully. So the filter can’t be used in this case.
This same issue happens on more of my websites.
Thanks for your help.
The page I need help with: [log in to see the link]
- The topic ‘Sitemap empty on www url version (Unsafe attempt to load URL error)’ is closed to new replies.