Google introduced SiteMaps a few days ago. SiteMaps lets webmasters inform search engines (not necessarily only Google) about which pages they have recently updated; expected update-frequencies as well as sender-set priority (i.e. if you have a couple of pages you consider a lot more important than others, Sitemaps lets you inform the search engine about it). Google does not necessarily adhere to your 'instructions' (i.e. if you set all your pages to priority 1, they will all be considered "average"; and if you set all your pages to "hourly" updates, don't expect the googlebot to come knocking unless you actually DO maintain your pages to this frequency...)
A couple of people have started playing with templating Sitemaps templates for blogging tools, especially Movable Type. I found the existing templates a bit too 'brute force' for my taste, as well as incomplete:
My view is that comments significantly enhance the value of an archived entry, so I'd want search engines to know about not only when I last edited an archived entry, but also when anyone last contributed to it. The correct way to implement this would take into consideration whether an entry has comments, and display the last comment date as "last modified" if present, otherwise it should display when the entry itself was last edited (disclaimer: yes you might sometimes edit an entry after last comment has been added, but in my case that is very rare and I can live with this known bug').
Additionally, the two other stabs at creating Sitemap templates for Movable Type don't take into account that you might want to assign different priorities and scan frequencies to your entries (as described here). The template below says that the blog front page has highest priority & scould be scanned daily. Next comes the ten most recent entries at priority 0.9, then the 10 next after that, and then "last 1000 entries" at priority 0.5. Modify numbers and priorities as you want & spread the word:
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">Update: Cameron shows how to include monthly and category for those wishing to include them in the sitemap.<url>
<loc><$MTBlogURL encode_xml="1"$></loc>
<priority>1.0</priority>
<MTEntries lastn="1">
<lastmod><$MTEntryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%S+00:00"$></lastmod>
</MTEntries>
<changefreq>daily</changefreq>
</url><MTEntries lastn="10">
<url>
<loc><$MTEntryPermalink encode_xml="1"$></loc>
<lastmod><MTIfNonZero tag="MTEntryCommentCount"><MTComments lastn="1"><$MTCommentDate utc="1" format="%Y-%m-%dT%H:%M:%S+00:00"$></MTComments><MTElse><$MTEntryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%S+00:00"$></MTElse></MTIfNonZero>
</lastmod>
<priority>0.9</priority>
<changefreq>daily</changefreq>
</url>
</MTEntries><MTEntries lastn="10" offset="10">
<url>
<loc><$MTEntryPermalink encode_xml="1"$></loc>
<lastmod><MTIfNonZero tag="MTEntryCommentCount"><MTComments lastn="1"><$MTCommentDate utc="1" format="%Y-%m-%dT%H:%M:%S+00:00"$></MTComments><MTElse><$MTEntryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%S+00:00"$></MTElse></MTIfNonZero>
</lastmod>
<priority>0.8</priority>
<changefreq>daily</changefreq>
</url>
</MTEntries><MTEntries lastn="1000" offset="20">
<url>
<loc><$MTEntryPermalink encode_xml="1"$></loc>
<lastmod><MTIfNonZero tag="MTEntryCommentCount"><MTComments lastn="1"><$MTCommentDate utc="1" format="%Y-%m-%dT%H:%M:%S+00:00"$></MTComments><MTElse><$MTEntryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%S+00:00"$></MTElse></MTIfNonZero>
</lastmod>
<priority>0.5</priority>
<changefreq>monthly</changefreq>
</url>
</MTEntries></urlset>
Thanks for tracking back to my blog.
I readily used your template.
But, I thought the template has better using "<$MTBlogTimezone$>" after "<$MTEntryModifiedDate$>".
because I'm Japanese and local timezone is "+09:00", I need to change this part.
Just for information,Thank you.:-)
Posted by: yoshuki on June 7, 2005 06:05 PMHashim; the date format has to be ISO 8601:
http://www.google.com/webmasters/sitemaps/docs/en/protocol.html#xmlTagDefinitions
http://www.jacobsen.no/anders/blog/archives/2003/06/03/iso_8601_the_standard_date_format.html
Example:
2004-09-22T14:12:14+00:00 and 2004-09-22 are valid; but I'm not sure about 2004-09-22T14:12:14 (Google says you can publish without the time part, but it does not explicitly mention the time zone)
Yoshuki; you probably want to remove utc="1" if you set another time zone.
Posted by: Anders on June 7, 2005 07:27 PMHello, again.
I tried to remove 'utc="1"', but sorry, it was not correct format.
Help says,
https://www.google.com/webmasters/sitemaps/docs/en/protocol.html#sitemap_lastmod
and I changed
<$MTEntryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%S+00:00"$>
to
<$MTEntryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$>
If you have any idea about this else, please let me know.
This code works just fine. This is also the same code that is in the default RSS 1.0 template for outputting the date.
<$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$>
Thanks for the template!
Posted by: Michael on June 10, 2005 03:17 AMExcellent template! Thanks.
Posted by: Mary on July 1, 2005 08:20 PMHey Yoshuki,
I am also based in Japan and used the template code from http://www.cbulock.com/2005/06/sitemaps_-_latest_update.html which works with no problems.
I get 2005-07-25T17:19:41+09:00 in the xml output.
Posted by: Paul on July 26, 2005 05:36 AMHi
How do you think can i run blog from Samsung D500? :-\
ooops... sorry. It was comment for a post "Mobile Blogging"
Posted by: Melody Man on September 2, 2005 08:49 PMDoes it also make sense to add the Google Sitemap ping URL to the Movable Type preferences "Publicity/RemoteInterfaces/TrackBack" list? Would that work?
Posted by: Mecandes on November 21, 2005 10:53 PMHello, Ive found your interesting hack on delicious, and take contact with you to see if youd like to collaborate with our team in Schweiz for some major applications.
for some ideas see above page and click on editorial,
regards
©
Anders Jacobsen [extrospection.com photography] |