Google sitemap for Blogger

If I wasn’t a geek I wouldn’t have a blog, but this is the first time I’ve been moved to write a truly geeky blog entry. But hey, I’m quite proud of this Blogger hack that generates Google Site Maps, which were announced on Thursday. Google’s billing this as an experiment the aim of which is to see if webmasters can be trusted to provide information on the structure of their websites, including location of new pages, frequency of update, last update and the relative priority of each page.

Inclusion in Google brings loads of traffic and it’s important to people like me who use Google’s site search. I’m quite lucky because of the 475 pages I’d like to be indexed 468 are in, but I’ve no idea which seven have been excluded. Offering Google a sitemap may not ensure that those seven pages are added, but it should give Google a hint as to which seven pages I’d miss the least.

Details of the Google sitemap protocol are here and while I’m in no position to offer any form of technical support whatsoever, I have created a Blogger template that enables the creation of Google sitemaps. You are welcome to use this as you see fit, and while I can’t oblige you to post a link and thank-you on your own blog, that would be nice.

How to generate the sitemap et cetera…

BAD NEWS: This only works if you’re able to upload files directly to your blog’s host directory. In other words, this is no use to Blogspot users.

DISCLAIMER: I’m sorry if you get lost (make sure you’ve backed up your template) or if anything goes wrong, but I’m not able to offer technical support or take responsibility for anything.

GOOD NEWS: You never hit publish as the sitemap appears in the Blogger preview window. (If you do hit publish you’ll be making a terrible mistake.)

At time of writing the sitemap protocol includes four sub tags, your sitemap will include all except <lastmod>, which isn’t very important anyway. So here we go…

  • Simply replace your Blogger template with the one below. Don’t save template changes
  • Hit ‘preview’ and a Google sitemap appears. Hit ‘Clear Edits’ and your proper template should reappear (if not restore from back-up).
  • Cut and paste the sitemap into a text file (use Notepad, which is usually found in ‘All Programs > Accessories’).
  • Change ‘http://YOUR-BLOG-HOMEPAGE-URL’ and ‘http://YOUR-BLOG-SITEFEED’ as appropriate.
  • <priority> tag: Pages are assigned priorities on the scale 0.0 to 1.0. These are relative so scoring every page 1.0 is the same as scoring every page 0.0. I’ve suggested scoring the homepage and site feed as 0.8, archives 0.6 and ordinary posts 0.4. So the homepage is twice as important as an ordinary post, while an archive is somewhere in between. But you do what you like.
  • <changefreq> tag: You can tell Google how often pages are updated. I’ve suggested the homepage and site feed change daily, while archives and individual posts never change. Check here to see what you can change this to. (You may also wish to change the <changefreq> on your current archive page manually from ‘never’ to ‘daily’.)
  • Save the sitemap as ‘sitemap.xml’ making sure ‘UTF-8’ encoding is selected.
  • Upload this file to your blog’s host directory i.e. to create the URL ‘http://YOUR-BLOG-HOMEPAGE-URL/sitemap.xml’.
  • Notify Google and you’re done.
  • Feel free to link back to this page: as a thank-you.

Only posts currently included on your homepage are mapped; to do the whole blog change go to formatting in your blog settings and change the number of posts on your main page to 999 (Blogger imposed maximum), but don’t select either republish option and remember to change it back when you’re done.

Obviously, you can reprioritise certain posts manually. If you do, rather than re-create a whole new sitemap and lose those changes, forget about changing the number of posts to 999 and cut and paste the <url>……</url> tag sets for your most recent posts into your first sitemap. Sadly, you’ll have to update the sitemap and notify Google manually. I’ll probably update weekly.

Here’s the code, with stuff you’ll need to change or want to play with in bold…
&lt;?xml version=”1.0″ encoding=”UTF-8″?&gt;<br>
&lt;urlset xmlns=”″&gt;<br>

&lt;!– INDEX PAGE & SITE FEED –&gt;<br>

&lt;!– ARCHIVE PAGES –&gt;<br>

&lt;!– INDIVIDUAL POSTS –&gt;<br>
&lt;!– &ltBlogItemTitle><$BlogItemTitle$></BlogItemTitle> –&gt;<br>

29 thoughts on “Google sitemap for Blogger

  1. um didn’t he say
    “BAD NEWS: This only works if you?re able to upload files directly to your blog?s host directory. In other words, >>>this is no use to Blogspot

  2. Doesn’t Google own Blogger/Blogspot? Seems kind of foolish that they’re not more integrated. If it were Yahoo, it would have been taken care of long ago.

  3. Huh! What’s the difference between Blogger and Blogspot, I mean I use Blogger and it puts it up onto Blogspot so Stephen when you say this is a Google sitemap for Blogger, if it’s not for Blogspot then how else can you use the sitemeap generated for Blogger?

  4. Blogspot is Blogger’s free hosting service. Many Blogger users prefer to opt out of Blogspot for all sorts of reasons.

    For example, you can use your own domain name and get greater control over how you blog behaves.

  5. Or you could do it the quick way by including the atom.xml feed that blogger provides for you.

    If you look at the alternative formats that blogger accepts, RSS feeds is listed. I’m currently testing this with my blog but I don’t see why it wouldn’t work.

    Remember, there is no spoon.

  6. Correction from my last post.

    If you look at the sitemap formats that GOOGLE SITEMAPS (not blogger) accepts, RSS is one of them. So, for my sitemaps account I have as the ‘sitemap’ address.

    As long as the RSS feed is turned on this should work fine.

  7. Using your Atom feed is okay, but you can’t set priority or change frequency tags.

    More disappointingly, you won’t be able to upload a site verification file and so won’t get access to the stats Google offers.

  8. Thanks for this tool.. had to hack your code around slightly to make it work – later found out this was due to the way your site displays for me in Firefox.

    Just to let you know..

  9. thanks for the hack… I get it to work once and changed one of my blog date and time and screw it up.

    Will try to re-do again. I thought if I use my own domain to host the blog. there is no problem to generate sitemap.

  10. Pingback: Blogger Buster

  11. I submitted my blog site sitemap as

    This website has 32 posts. I found in Google sitemap area; Only 26 webpages are included and what about remaining pages. Every day i post new topic to my website but the figure of webpages does not exceed to 26 pages.

    I don’t know what is the problem. Give proper suggestion.

  12. Dear, can you help me out from the puzzle I am facing. My blog has been verified by google crawler but while seraching with the name of e-fundays, the google search does not detect it. How can I solve this problem.

  13. Hi Suman

    I abandoned Blogger a little over a year ago and I can’t offer technical support in any case. I’m afraid you’re on your own.

    But I don’t see why you can’t use that feed. However, you probably won’t be able to specify priorities and your feed only contains the last 25 entries. You may have difficulty verifying a Google account as you don’t have FTP access.

    Why don’t you just try it and see what happens? That’s how most people learn.

  14. Hello!

    It’s very interesting article but I already created my sitemap.xml However I don’t know how can I upload the sitemap.xml to Blogger. Do you have any idea?

Leave a Reply