Error loading stylesheet Google XML Sitemaps
If you are using WordPress plugin Google XML Sitemaps, you may receive the following error while accessing your sitemap without WWW (http://yourwebsite.com/sitemap.xml):
Error loading stylesheet: An unknown error has occurred (805303f4)
However you can access the same sitemap using WWW (http://www.yourwebsite.com/sitemap.xml).
How to fix this problem?
Easy way to this problem is to write rewrite rule.
[1] Redirect non-WWW to WWW URL:
If you are using www.yourwebsite.com, you can add the following rule in your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourwebsite.com [NC]
RewriteRule ^(.*)$ http://www.yourwebsite.com/$1 [L,R=301]
[2] Redirect WWW to non-WWW URL:
If you are using yourwebsite.com (without www prefix), you can add the following rule in your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.yourwebsite.com [NC]
RewriteRule ^(.*)$ http://yourwebsite.com/$1 [L,R=301]