Title: [Plugin: Google XML Sitemaps] Error loading stylesheet
Last modified: August 19, 2016

---

# [Plugin: Google XML Sitemaps] Error loading stylesheet

 *  812206
 * [17 years, 10 months ago](https://wordpress.org/support/topic/plugin-google-xml-sitemaps-error-loading-stylesheet/)
 * Hi,
 * I just installed the plugin today, “built” my sitemap, and have received no error
   messages during either of those activities. However, once I click on the link
   to my sitemap that shows up under “Status,” I receive the following error message:
 * Error loading stylesheet:An XSLT stylesheet does not have an XML mimetype.
 * I would appreciate it if someone could help me determine what this problem is
   and how to solve it. Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [capelyddol](https://wordpress.org/support/users/capelyddol/)
 * (@capelyddol)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-google-xml-sitemaps-error-loading-stylesheet/#post-824081)
 * I have the same problem. It results, I believe, from the stylesheet ‘sitemap.
   xsl’, included with the plug-in, not being recognized for some strange reason
   I have yet to fathom. In the ‘Advanced’ section of the sitemap plug-in dashboard
   look for the “Include an XSL stylesheet” textbox. Delete the default URL in there,
   click ‘Update Options”, then under ‘Status’ click the link ‘rebuild the sitemap
   manually’. Once the page has reloaded you should be able to view your sitemap,
   albeit in ‘tree’ form and not nicely laid out as it would be if the stylesheet
   was functioning. At least you’ll know its working.
 * If anyone has sorted this obviously common problem – PLEASE let us know.
 *  [capelyddol](https://wordpress.org/support/users/capelyddol/)
 * (@capelyddol)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-google-xml-sitemaps-error-loading-stylesheet/#post-824083)
 * Okay, after much delving I’ve found a solution in the archives, but as it seems
   a fairly common problem, I’ll repeat it here:
 * The stylesheet ‘sitemap.xsl’ located in the Google-Sitemap-Generator directory,
   requires minor alteration. Open it in a text editor, delete the first line: `
   <?xml version="1.0" encoding="UTF-8"?>` and replace it with: `<?xml version=”
   1.0″ encoding=”UTF-8″?>
    <?xml-stylesheet type=”text/xsl” href=”product-list.
   xslt”?>`
 * Then open your .htaccess file in an editor and insert this: `AddType application/
   xml .xsl`
 * That solved the problem for me. My thanks to members mrsdiva and npen for pointing
   me in the right direction.
 * NOTE: I didn’t have a .htaccess file. Apparently, it isn’t automatically created
   when WordPress is downloaded. To create one, open a text editor like Notepad,
   click on ‘file’ then ‘New’, name the new file `htaccess.txt`, add the bit of 
   code above and save it to your local WordPress folder. Then upload it to your
   server and _rename_ it `.htaccess`
 * Finally, go to your WordPress Admin Google-Sitemap-Generator dashboard. In the‘
   Advanced Options’ is a text box and a link, ‘Use Default’. Clicking the link 
   will insert the path to your `sitemap.xsl’ file. Scroll down, click ‘Update Options’.
   Once the page has refreshed, scroll up to the ‘Status’ section (top) and click
   the link ‘rebuild the sitemap’. It will take a few seconds for the page to refresh,
   then on the first line in the ‘Status’ section click on the link: ‘sitemap’.
 * If all is well, your styled sitemap should magically appear.
 *  [tgurl](https://wordpress.org/support/users/tgurl/)
 * (@tgurl)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-google-xml-sitemaps-error-loading-stylesheet/#post-824092)
 * well Ive got a wacky one to add to this pile …
 * I followed your instructions and did get a tree version
 * which was better that the other mashed version … thank you for that help …
 * now when I hit rebulild I getthe tree version at [http://mydomain.com/sitemap.xsl](http://mydomain.com/sitemap.xsl)….
   if I switch the xsl to xml from that page I get a beautiful sitemap … but … if
   I just type in [http://mydomain.com/sitemap.xml](http://mydomain.com/sitemap.xml)
   from a blank browser I get nothing … blank page
    the only way I can see my “pretty”
   sitemap is to already be on xsl and the switch the s to an m …
 * also I want sure exactly where to put the code
 * AddType application/xml .xsl in my existing htaccess. file
 * this is what it looks like now
 * # BEGIN WordPress
    <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond%{
   REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.
   php [L] </IfModule>
 * # END WordPress
 * perhaps where I did put it is in the wrong placethus the “ghosting” xml sitemap
   appearance …
 * I had it
    # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase/
   RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule./
   index.php [L] </IfModule>
 * AddType application/xml .xsl <——— I put it there originally (then removed it)
   #
   END WordPress
 * I figure the placement of that code is why this is occuring … any suuggestions?
 *  [capelyddol](https://wordpress.org/support/users/capelyddol/)
 * (@capelyddol)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/plugin-google-xml-sitemaps-error-loading-stylesheet/#post-824102)
 * tgurl
    I’m not at all sure why you have this problem. I don’t see it matters 
   whether you put `AddType application/xml .xsl` before or after the other code
   in the .htaccess file. I can get a sitemap by typing in [http://mydomain.com/sitemap.xml](http://mydomain.com/sitemap.xml).
   I have nothing else in .htaccess, though.
 * Hope you get it sorted.
 *  [kryptonicwave](https://wordpress.org/support/users/kryptonicwave/)
 * (@kryptonicwave)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/plugin-google-xml-sitemaps-error-loading-stylesheet/#post-824105)
 * capelyddol
 * I did what you suggested and I see my tree style sheet. Is this ok to leave like
   this or is the style sheet needed to work correctly. Please let me know asap.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘[Plugin: Google XML Sitemaps] Error loading stylesheet’ is closed to 
new replies.

 * 5 replies
 * 4 participants
 * Last reply from: [kryptonicwave](https://wordpress.org/support/users/kryptonicwave/)
 * Last activity: [17 years, 8 months ago](https://wordpress.org/support/topic/plugin-google-xml-sitemaps-error-loading-stylesheet/#post-824105)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
