World of Leion

Adding human readable Google sitemap

This aims to describe the steps in getting a human readable Google sitemap into the Wordpress blogging system. First of all, download the google sitemap generator plugin.

Open up the php file, look for line 1100 for this line

$s.="<!-- sitemap-generator-url=\"http://www.arnebrachhold.de\" sitemap-generator-version=\"2.7.1\" -->\n";

Add the following line after it.

$s.="<?xml-stylesheet type=\"text/xsl\" href=\"gss.xsl\"?>\n";

Now save the file, upload and activate it.

Make a sitemap.xml file on the blog root and make it writable.

Download the gss.xsl stylesheet to display the xml file. Read more about the style sheet here.

Save it to the same location as your sitemap.

Now, edit the .htaccess file and add at the bottom the following:

AddType application/xml .xsl

Now the stylesheet can can be viewed when it is opened. So you can just add it to your page as a regular link. I put mine in the sidebar. The sitemap can be read by humans and google bots now!

17 Responses to “Adding human readable Google sitemap”

  1. 1
    ?? Blog » Search Engine Optimization for Wordpress Says:

    [...] Make your sitemap human readable (http://blog.leion.net/2006/06/02/adding-human-readable-google-sitemap/) [edit] [...]

  2. 2
    veg Says:

    hi, is this mod compatible with the latest sitemap version?

  3. 3
    Leion Says:

    This mod changes the layout file so that the presentation is different. Hence This should be compatiable with the latest sitemap version

  4. 4
    Dominic Says:

    Thanks for this link, I have now added it to the sitemap generation code for Wordpress. One change, however, I am using the latest beta version, so you need to add the following code (rather than your code detailed above) $this->AddElement(new GoogleSitemapGeneratorXmlEntry('<?xml-stylesheet type="text/xsl" xhref="gss.xsl"?>'));  Which should come just after line 1530 now. Thanks again for a great link. Dominic. 

  5. 5
    Leion Says:

    Thanks for the update. For some reasons, the version 3 do not work for me. 

  6. 6
    Don Lapre Fan Says:

    Cool thanks for the info dude!  it will come in handy.

  7. 7
    James Says:

    The line Dominic suggested didn't work for me until I changed 'xhref="gss.xsl" mce_href="gss.xsl"' to 'href="gss.xsl" mce_href="gss.xsl"' I'm now using google sitemap generator plugin v3, and the formatting from SourceForge and put it together as a zip at http://thatsnowsthegoat.com/index.php/archive/google-and-human-readable-sitemap/ Both versions 1.4 and 1.5a are available. 

  8. 8
    VitaminDude Says:

    I have a question - how do you establish a sitemap google can find if you have your site setup to handle all page requests not in the database to a set page, like redirect back to the main domain - if you dont have that page in the database.  is it possible to put your sitemap somewhere else and have google use it - like in an IP accessed ftp or on another domain?  Thoughts?

  9. 9
    Leion Says:

    First of all, the google sitemap file should be located at the root of your site if you have many many sub domains that you want to add in. Pages from other domains will not be able to reported in it. These pages need extra sitemap files. For pages in your domain that is not in the database, you can add them in the google sitemap generator to have them included in the sitemap.

  10. 10
    SEO in Wordpress | AskApache.com Says:

    [...] Make your sitemap human readable (http://blog.leion.net/2006/06/02/adding-human-readable-google-sitemap/) [...]

  11. 11
    Willman Says:

    Excellent article

  12. 12
    VitaminDude Says:

    I don;t get coment #10 is it spam??

  13. 13
    Lee.org » Installed Sitemap Generator Plugin Says:

    [...] is that the sitemap (in the sidebar too) is pretty well human readable and searchable via this tool. tb - possibly related posts-Installed Search Everything Plugin-Installed Adhesive [...]

  14. 14
    Bob Says:

    I’ve used Google sitemaps on a few sites now and each time it’s had an adverse effect on my rankings. Has anyone else experienced this?

  15. 15
    Leion Says:

    Google has been bringing in traffic for me. I think this is because I have the sitemap

  16. 16
    SEO para Wordpress Says:

    [...] Make your sitemap human readable [...]

  17. 17
    ????? Says:

    [...] Make your sitemap human readable [...]

Leave a Reply

Sponsored links : Loans - Mortgages - Credit Card Consolidation - Arizona Pools

© 2005-2008 Leion All Rights Reserved.
World of Leion is proudly powered by Wordpress
Navigation Theme by GPS Gazette