« Social Bookmarking??? (Part II.) | Main | Google Sitemap again... »

XML Sitemap for Movable Type Blog?

I have been showing off my new X10 blog to lots of friends, but today I made the mistake to show it to Jan, who is a good friend and former colleague, that now works in Dublin for Hewlett Packard.

Jan is what I call a typical German (no, he does NOT drink his beer warm, no German I know does! ) What is very true for him though was best said by my american brother in law once, he said:

"In Germany praise is the absence of criticism."

That's Jan! I could hear his brain working, trying to find the flaw in my blog. He couldn't critize the coding much, since I use a software, and the contents are a question of personal preference. Then it made "click" in his brain, he said: "How do you get Google to crawl all those generated pages?"

Our first thought was of course Google's Sitemaps, but how would that work without submitting a seperately hosted XML file somewhere, which would have to be updated everytime you create a new blog entry.

Content that he found a flaw, we exchanged a few more words and I went back to my Saturday morning. His comment left me no peace though, I started going through my blog templates. An hour later I called Jan again, because I had found the solution. I wanted to share it with all of you here:

How to automatically have your blog's sitemap updated:
Let me make it easy for you. Simply build a new index template and copy and paste the following code:

<?xml version="1.0" encoding="UTF-8"?>

<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">


<loc><$MTBlogURL encode_xml="1"$></loc>



<MTEntries lastn="9999">


<loc><$MTEntryPermalink encode_xml="1"$></loc>

<lastmod><$MTEntryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%SZ"$></lastmod>




Save it in xml format and rebuild your index. That's it!

To let Google know about your map, open your browser and enter the following in the address field:

http://www.google.com/webmasters/sitemaps/ping?sitemap= + the URL-encoded location of your sitemap

For example:

If you have a Google account you can use it to track. See: http://www.google.com/sitemaps/


TrackBack URL for this entry:


Yeah, I forgot to mention this idea to you.

Right... :)

I bet you "forgot" this too... :)

Very interesting site. Hope it will always be alive! http://blogsuite.info/blog/

Very interesting site. Hope it will always be alive! http://blogsuite.info/blog/

Post a comment