Fixing “An XSLT stylesheet does not have an XML mimetype” Error

by TutsArena - Development

If you are new to blogging stuff then let me introduce you with xml sitemap. XML sitemap contains all your blog posts links listed on a single page — when search engine bots crawl your website for new content, the sitemap helps bots to pick all post links so they index quickly. In this post we are going to tell you how to rectify an XML error that appears sometimes when you try to make XML sitemaps with Wordpress.

Problem

Google XML Sitemaps plugin for WordPress helps you make XML sitemaps with just a click of your mouse. Apart from making sitemaps, this plugin also submits sitemaps to many search engines, which helps to get new links indexed quickly. Recently on my new blog install I ran into a problem: after generating the sitemap, I noticed it was not loading in Firefox while Internet Explorer was having no problem at all.

Here is the XML error I was getting:

“An XSLT stylesheet does not have an XML mimetype”

After a little bit of digging I realized that the MIME type for XSL was not listed along with other mime types on the server. This is a server-side error, not yours, but you can over come this problem very easily.

Solution:

1. Open .htaccess file you can find this file on root of your blog directory normally public_html

2. Add following line at the end of the file content then save it. Make sure not to put it in between some other code it can easily mess around and take your blog down in no time.

AddType text/xsl xsl

That’s it, the error should be gone now. If you are still facing problems, include the following line along with the one above:

AddType application/xml xml

About the author

TutsArena is dedicated to providing the best, free web design tutorials.


Visit TutsArena's Website | All Articles From This Author

One Comment


Add your comment - (need a gravatar?)

Enable CommentLuv?

Sponsors

Recent tutorials

Sponsors

Write for us!

Write tutorials for us and make money! Check out the details and submit your tutorial.