Sitemaps - Latest Update
Jun/06/2005 11:39 AM
I have updated my sitemap and the new one is now based on Niall Kennedy's template that he created. This template outputs the exact same sitemap I had setup before, but that one was using the sitemap generator and a config.xml file along with a urllist.txt file that was outputted using Movable Type. This new template just outputs the XML file straight from Movable Type. The template I created outputs the main index page, all individual archives and also monthly and category archive links in the sitemap.
Here is my latest template:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84
http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
<url>
<loc><$MTBlogURL encode_xml="1"$></loc>
<changefreq>daily</changefreq>
<MTEntries lastn="1">
<lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod>
</MTEntries>
<priority>1.0</priority>
</url>
<MTArchiveList archive_type="Individual">
<url>
<loc><$MTArchiveLink encode_xml="1"$></loc>
<lastmod><$MTArchiveDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod>
<priority>0.8</priority>
</url>
</MTArchiveList>
<MTArchiveList archive_type="Category">
<url>
<loc><$MTArchiveLink encode_xml="1"$></loc>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
</url>
</MTArchiveList>
<MTArchiveList archive_type="Monthly">
<url>
<loc><$MTArchiveLink encode_xml="1"$></loc>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
</MTArchiveList>
</urlset>
To set this up on your own installation, simply copy the code into a new index template and set it to output as sitemap.xml or whateveryouwant.xml.
Feeds
11 Comments
Really don't mean to be picky - because this is great stuff! - but I tried having a look at your updated live version and got this:
A name was started with an invalid character. Error processing resource 'http://www.cbulock.com/templates/Sitemap'. Line 8...
<loc><$MTBlogURL encode_xml="1"$></loc>
------^
It may well be my fault - how do I get to see it?
Anyway thanks for the good work :)
Comment by: Piers Young on June 06, 2005 07:26 PM
No, actually it's not you. It's Internet Explorer. It's trying to render it as an XML file instead of a text file. I just use Firefox and that displays the page right so I hadn't noticed. As of right now, the code displayed on this page is the same as the live template I am using. I will try getting that issue resolved shortly so it will display in IE too. As for now, you can also just do a 'Save Target As' in IE and save it as a text file.
Comment by: Cameron Bulock on June 06, 2005 07:42 PM
Great stuff. One small change for me to get it to work correctly with my site and Google.
Under the daily freq, to get the main url time correct -
Had to change:
<lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod>
To:
<lastmod><$MTArchiveDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod>
The MTEntryModifiedDate was producing a barfed date that Google was hanging on.
Great Work!
Comment by: Tj on July 01, 2005 12:46 PM
Sorry about the previous post - the text did not render proper.
Simply change the MTEntryModifiedDate to MTArchiveDate in the first URL section.
Comment by: Tj on July 01, 2005 12:49 PM
I tried this code on my site. I get an Invalid Date error. I have dropped off $MTBlogTimezone$ and resubmitted. Maybe it is due to the fact I am in GMT+9 ?
Comment by: Paul on July 26, 2005 12:49 AM
Does anyone know how to create a categorized list of entries in a Google site map?
Comment by: JDG on August 23, 2005 12:11 AM
Does it also make sense to add the Google Sitemap ping URL to the Movable Type preferences "Publicity/RemoteInterfaces/TrackBack" list? Would that work?
Comment by: Mecandes on November 21, 2005 04:51 PM
The method Google uses to ping the sitemap URL is different than the method that Movable Type uses to ping sites, so it wouldn't work. Might be a cool thing to make a plugin for though
Comment by: Cameron Bulock on November 21, 2005 06:04 PM
I've heard alot about using the Google sitemap ,xml file, but does this process actually help your SE rankings?
Comment by: Brent on April 14, 2006 07:25 PM
Great!
I'll use this.
Comment by: MovableType Blogger(JP) on November 08, 2006 04:31 PM
If you want to publish a search engine independent sitemap in ROR format, I have compiled a Movable Type template <a href="http://laurent.delavaissiere.net/blog/2006/04/making_search_engines_life_eas.html">here</a>.
http://laurent.delavaissiere.net/blog/2006/04/making_search_engines_life_eas.html
Comment by: ldelavaissiere on November 12, 2006 06:59 PM