Jun03

Google Sitemaps using Movable Type

It's pretty easy to make an XML Sitemap of your blog for easy parsing by Google or other search engines.

Just create a new index template and copy the code below. Choose an output file that is easy to remember such as sitemap.xml. Save and rebuild your new template file once you paste the code.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
<url>
<loc><$MTBlogURL encode_xml="1"$></loc>
<priority>1.0</priority>
</url>
<MTEntries lastn="9999">
<url>
<loc><$MTEntryPermalink encode_xml="1"$></loc>
<lastmod><$MTEntryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%SZ"$></lastmod>
</url>
</MTEntries>
</urlset>

Now you need to let Google know where to find your sitemap. Open up your web browser and enter http://www.google.com/webmasters/sitemaps/ping?sitemap= + the URL-encoded location of your sitemap.

That's it! You can use your Google account to keep track of your pings or multiple sites.

Tags:

25 Comments

Commentary on "Google Sitemaps using Movable Type":

Subscribe to new comments

  1. Arvind on June 3, 2005 at 4:07 AM wrote: #

    I'm guessing we add a ping to google in the publicity options in MT too so that Google knows things have changed?
  2. ? Niall Kennedy on June 3, 2005 at 7:20 AM wrote: #

    Arvind: No, because it is a different notification method. Movable Type publicity options currently supports XML-RPC pings in the Weblogs.com format only. Movable Type would need to have HTTP Post publicity options with the ability to specify parameters in this case but I think it's more likely that Google will introduce their own XML-RPC ping beacon with support for extended ping -- home page + feed location -- as Google Fusion and other products ramp up.
  3. Author Profile Page aharden on June 3, 2005 at 1:30 PM wrote: #

    Niall, thanks for getting something together so quickly. I'll be using it on my sites this weekend.
  4. Jon Gales on June 3, 2005 at 2:31 PM wrote: #

    Great start! It would be nice to introduce priority for permalinks and add in archive pages. At least on my site, there are a lot more pages that I would like indexed that the index and permalinks (categories, monthly archives, etc).
  5. epc on June 3, 2005 at 7:59 PM wrote: #

    Do Google require utf-8 or should the first line be changed to use for the character encoding?
  6. epc on June 3, 2005 at 8:02 PM wrote: #

    Just to answer my own question, yes sitemap is required to be UTF-8: https://www.google.com/webmasters/sitemaps/docs/en/protocol.html#faq_output_encoding
  7. The One True b!X on June 4, 2005 at 12:11 AM wrote: #

    Presumably there's no way in MT to include modification information for things like index templates? I have a bunch of other pages beyond my entries that theoretically should be included as well, I would think.
  8. ? Niall Kennedy on June 4, 2005 at 12:24 AM wrote: #

    You can add MTBlogArchiveURL or a MTArchiveList wrapper with MTArchiveLink link values if you'd like. In my case I have not added descriptions to all my categories so most of what I care about Google finding is at the individual entry level.
  9. Marc James on June 4, 2005 at 12:28 PM wrote: #

    This isn't working for me on MT 3.16. http://www.sports-central.org/sitemap.xml I created a new index template and used the above code. I've rebuilt, as well. But I am getting an error. What am I doing wrong?
  10. JD on June 4, 2005 at 7:45 PM wrote: #

    Do you know if this will work for TypePad (Pro, of course)?
  11. Coolmax on June 5, 2005 at 9:57 PM wrote: #

    2Marc James: Change 9999 to 10
  12. Anders on June 6, 2005 at 6:06 AM wrote: #

    Need to look into how the last modified date can include the date of the last comment instead of the edit date; as comments are what makes individual archive files change over time (& grow more interesting?)
  13. Author Profile Page windlike on August 19, 2005 at 12:36 AM wrote: #

    Google has announced Google Sitemaps, which is a free online service for Webmasters
  14. Author Profile Page windlike on August 19, 2005 at 12:40 AM wrote: #

    Today, Google has unveiled a new Google Sitemaps program allowing webmasters and site owners to feed it pages they'd like to have included in Google's web index. Participation is free. Inclusion isn't guaranteed, but Google's hoping the new system will help it better gather pages than traditional crawling alone allows. Feeds also let site owners indicate how often pages change or should be revisited. Below, a Q&A on the new program with Shiva Shivakumar, engineering director and the technical lead for Google Sitemaps. Laptop Batteries Camera Batteries Camcorder Batteries
  15. Author Profile Page dakiny on October 7, 2005 at 1:10 PM wrote: #

    Thank you for Mr.Niall Kennedy. Many of my friends including me became fortunate, thanks to Google Sitemaps using Movable Type which you made. From now on, please provide a world with good work. I am sorry to be awkward English. the last -- once again -- thank you.
  16. Mecandes on November 21, 2005 at 1:51 PM wrote: #

    Does it also make sense to add the Google Sitemap ping URL to the Movable Type preferences "Publicity/RemoteInterfaces/TrackBack" list? Would that work?
  17. Author Profile Page J. P. on December 22, 2005 at 9:57 PM wrote: #

    Personally, I don't like TypePad only providing sitemap for Pro membership. I am trying to find a workaround for non-Pro users. Some discussion in my blog.
  18. Author Profile Page Murky on February 3, 2006 at 8:33 AM wrote: #

    Here is a link to my sitemap (which has a variety of sections for the different types of archive) http://www.murky.org/archives/2005/09/google_sitemaps.html
  19. Jon Silvers on February 9, 2006 at 10:51 AM wrote: #

    Thanks! I barely know HTML, but your instructions were easy enough to follow.
  20. Author Profile Page Bryan Buchs on March 9, 2006 at 11:53 AM wrote: #

    I'm using dynamic publishing for all my templates, including my Google sitemap index. Depending on your server's PHP settings, the initial "<?" may be identified as a PHP code block. I ended up using this: <<?php echo chr(63) ?>xml version="1.0" encoding="UTF-8"<?php echo chr(63) ?>>
  21. Author Profile Page ibeblunt on April 28, 2006 at 8:43 PM wrote: #

    In case anyone wants to make a sitemap for multiple blogs running under MT and you have the plug-in MULTIBLOG installed, you can use the following code: 1.0 daily daily
  22. Author Profile Page ldelavaissiere on May 14, 2006 at 2:49 AM wrote: #

    If you want to publish a search engine independent sitemap in ROR format, I have compiled a Movable Type template here.
  23. Author Profile Page Josh on June 24, 2006 at 8:33 PM wrote: #

    Thanks! It works perfectly here on MT 3.2. Maybe MT should include this by default...
  24. Leo Romanovsky on August 30, 2006 at 1:49 PM wrote: #

    Thanks! It works great with MT 3.3.
  25. Rostislav Siryk on August 25, 2007 at 8:02 AM wrote: #

    This work brilliant. I've submitted the Sitemap to Google. He accepted it and the asked me to register at its webmasters site to have control over it and see the stats.

    Really nice solution.

    One question I still haven't got an answer to: how to effectively measure the benefits of site-mapping?

Add a comment

Some comments may be placed in a moderation queue to ensure topical relevancy. You may contact author Niall Kennedy directly if you prefer to comment privately.


(not published)



Niall Kennedy Niall Kennedy is a web technologist in San Francisco, California in the United States. I am very interested in the world of... MORE »

Search this weblog:

Subscribe:

Latest feature: Widget development

Archives: Popular Categories