• Resolved jryanp

    (@jryanp)


    So my site is redirecting everything non-www to www version, with the exception of the xml sitemap being generated by the Yoast SEO plugin. If I go to the non-www version (mysite.com/sitemap_index.xml), it’s just a blank white screen (not a 404). But then if I go to the www version (www.mysite.com/sitemap_index.xml), it shows up just fine.

    It’s just weird how everything else gets redirected by the rewrite rule that WordPress adds to the htaccess file. I have also tried flushing the permalinks, but no luck.

    UPDATE – After inspecting the element, I see that I’m getting an error:

    Unsafe attempt to load URL https://www.mysite.com/main-sitemap.xsl from frame with URL https://mysite.com/sitemap_index.xml. Domains, protocols and ports must match.

    Anyone know of a fix?

    • This topic was modified 7 years, 12 months ago by jryanp.
    • This topic was modified 7 years, 12 months ago by jryanp.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Joe

    (@webworksjoe)

    Any word from Yoast about this jryanp?

    Seems like a pretty serious issue to me.

    I have the same issue and coming up blank. I don’t understand how this URL gets away with ignoring the rewrite rules in htaccess.

    My guess is that the unsafe element the browser is complaining about is due to the xml file at non-www trying to load a stylesheet (the .xls file) from the www subdomain.

    I tried to crawl the sitemap using bots specifically allowed in robots.txt and it fails due to “sitemap formatting errors”.

    I’d really appreciate some input from the authors.

    Many thanks in advance.

    Having this issue as well.

    Update: I resaved the permalinks and the sitemaps and the Site Settings > General. Refreshed the sitemap index and it now has the www.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Non-WWW XML Sitemap not redirecting to WWW’ is closed to new replies.