Viewing 10 replies - 1 through 10 (of 10 total)
  • I’m having the same issue with Version 4.0.4. Site map works fine with the WWW but when you remove it I get the error “Error loading stylesheet: An unknown error has occurred (805303f4)”

    here are the links :

    https://www.hauteshots.com/blog/sitemap.xml
    https://hauteshots.com/blog/sitemap.xml

    My buddy Dan came up with a make shift fix. In options :

    Include a XSLT stylesheet: (Full or relative URL to your .xsl file)

    Then uncheck use default.

    Your URL should be something like this:

    https://yourdomain.com/blog/wp-content/plugins/google-sitemap-generator/sitemap.xsl

    Thread Starter kmcminn

    (@kmcminn)

    Hello, erotic1.

    Thanks for your reply. I really do appreciate that. Unfortunately, that’s how I already have it set up. Below, you can see my old and new sitemap URLs, and what each of their pages look like. The new URL uses styling, as it should. The old sitemap URL still works, and the site map is still there, but no styling is used.

    I just can’t wrap my head around the reasoning for why there’s still even a sitemap present at my old URL. As previously mentioned, I’ve tried directing it to the URL but that doesn’t work.

    Old URL sitemap:
    https://www.nintendonews.com/sitemap.xml

    New URL sitemap:
    https://nintendonews.com/sitemap.xml

    Here’s a new fix I just came up with, do not put your domain in the URL:

    Settings/XML Sitemaps
    Advanced
    Include a XSLT stylesheet: /wp-content/plugins/google-sitemap-generator/sitemap.xsl

    Works with or without the www as seen here…

    https://themoneyshot.com/sitemap.xml

    https://www.themoneyshot.com/sitemap.xml

    p.s. The reason there’s still a sitemap present at your ‘old’ URL is because it’s really not your old URL. Your web server is still serving ‘www’ requests, so https://www.yourdomain.com/sitemap.xml resolves to the same location as https://yourdomain.com/sitemap.xml. It’s like calling a local phone number with the area code, you don’t need it but it still works and resolves to the same number.

    If you want to completely remove ‘www’ from all URL’s served by your site then you need to drop this code in your .htacess file..

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
    RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

    ^ this alone may actually fix the sitemap.xsl problem as well

    More information about ‘www’ deprecation can be found here if you’re interested:
    https://no-www.org/

    Thread Starter kmcminn

    (@kmcminn)

    Hi, Danny.

    Thanks for the info. After removing my domain from the stylesheet location, the site map is styled both ways, as you pointed out.

    However, after adding the rewrite to my .htaccess, attempting to access the sitemap at the www location results in that sitemap not having any styling.

    Here’s an example of what I’m trying to do:

    If you try to access:
    https://www.yoast.com/sitemap.xml

    … the browser is redirected to:
    https://yoast.com/sitemap_index.xml

    That’s essentially what I’m trying to achieve with my site so the “real” sitemap is always referenced in the browser.

    I just checked your site and you’re golden!

    https://nintendonews.com/sitemap.xml
    https://www.nintendonews.com/sitemap.xml

    sitemap_index.html is proprietary to Yoast’s sitemap functionality. If you’ve got Yoast’s sitemap functionality enabled turn it off, because you can’t have two sitemap engines running at once – they’ll conflict with each other.

    Go to Yoast’s XML Sitemap panel and make sure “xml sitemap functionality” is unchecked. Now you can stop worrying about sitemap_index.html because it’s not a search engine standard. Yoast renamed sitemap.xml to sitemap_index.html to avoid conflict – it’s their proprietary naming convention.

    Then make sure in Google XML-Sitemaps you have ‘Add sitemap URL to the virtual robots.txt file’ checked – now every browser hitting your site will find your sitemap.

    Thread Starter kmcminn

    (@kmcminn)

    Hi, Danny.

    I’ve double-checked the sitemap setting in Yoast and it’s already disabled… so that’s good.

    For the “Add sitemap URL to the virtual robots.txt file.” setting in Google XML-Sitemap settings, the description says:

    “The virtual robots.txt generated by WordPress is used. A real robots.txt file must NOT exist in the blog directory!”

    Shouldn’t I leave that unchecked, because I do have a robots.txt file present on my server.

    https://nintendonews.com/robots.txt

    In that case leave the settings as-is and add this line to your robots.txt

    Sitemap: https://nintendonews.com/sitemap.xml

    Thread Starter kmcminn

    (@kmcminn)

    Good idea, Danny. Thanks for all of your help! I truly appreciate it!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Sitemap Exists At Both www And non-www’ is closed to new replies.