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.
I’m guessing we add a ping to google in the publicity options in MT too so that Google knows things have changed?
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.
Niall, thanks for getting something together so quickly. I’ll be using it on my sites this weekend.
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).
Do Google require utf-8 or should the first line be changed to use for the character encoding?
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
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.
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.
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?
Do you know if this will work for TypePad (Pro, of course)?
2Marc James: Change 9999 to 10
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?)
Google has announced Google Sitemaps, which is a free online service for Webmasters
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
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.
Does it also make sense to add the Google Sitemap ping URL to the Movable Type preferences “Publicity/RemoteInterfaces/TrackBack” list? Would that work?
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.
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
Thanks! I barely know HTML, but your instructions were easy enough to follow.
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) ?>>
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
If you want to publish a search engine independent sitemap in ROR format, I have compiled a Movable Type template here.
Thanks! It works perfectly here on MT 3.2.
Maybe MT should include this by default…
Thanks! It works great with MT 3.3.
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?