My blog has moved! Redirecting…

You should be automatically redirected. If not, visit www.gangles.ca and update your bookmarks.

The Quixotic Engineer

Tuesday, July 17, 2007

Blogger, Feedburner and Sitemaps

Feedburner Logo

I had announced last Friday that I was being an eager beaver and taking advantage of the improved Feedburner integration for Blogger. However, like all early adapters, I've had been unfortunately burdened with the unresolved issues of the new technology. Specifically:

  • Once enabled, Google will redirect your Atom feed subscribers to Feedburner. However, Blogger also publishes a second feed (in RSS format) which for some reason it does not redirect. Feedburner won't be able to collect statistics about people who subscribe to the non-redirected feed, making your efforts fairly moot.
  • Bloggers who use their Atom feed as a sitemap for Google will receive errors due to their Feedburner feed being in a different domain than the rest of their blog.

Using a bit of creativity, however, I do believe I've found a suitable workaround that should allow motivated Blogger users to integrate Feedburner and Google sitemap without these problems.


UPDATE: Easier Method
Commenter Lamer came up with an even simpler way to integrate both feedburner and Google sitemaps. Turn on the Feedburner redirection (Dashboard > Settings > Site Feed) and then use http://YOURBLOG.blogspot.com/rss.xml?orderby=updated as a sitemap (for whatever reason Blogger does not redirect this XML file). Simple and efficient, thanks Lamer! The rest of this post goes on to describe the old, more complicated method, which may be useful if you want to modify your autodiscovery tags.


Note: I do not recommend the trick explained below if you already have a sizeable number of subscribers to your Atom feed that you want to redirect to your Feedburner feed, since they will no longer be redirected afterwards. Use the updated trick above instead.

Preparation:
Set up a Feedburner account. When it asks you for your Feed URL, type in "YOURBLOG.blogspot.com/atom.xml".

Next, under the Blogger dashboard, go to Settings > Site Feed and clear the "Post Feed Redirect URL" field. This will stop Blogger from redirecting people who try to access your Atom feed.

Step One: Modify Your Autodiscovery Tags:
To credit my sources properly, I learned how to do this from a post by matt in the Feedburner forums that has since had its contents removed.

With your blog open, view the html source of your page. Look for a block of code similar to the following:

Copy the similar looking block from your blog's html source code and paste it in a temporary .txt document. You may now close your Blog's html source.

We're now going to modify what you just pasted into the .txt document. Replace these two lines:

with the following:

This next step will involve modifying your Blogger template. I strongly urge you to backup your Blogger template beforehand in case you make a mistake. From the Blogger dashboard, go to Template > Edit html. Look for the following line in your template's html:

Delete this line and replace it with the contents of the .txt file you saved earlier, then click "Save Template". You have now successfully modified the autodiscovery tags, and browsers that auto-detect RSS feeds will now be directed to your Feedburner feed only.

Step Two: Use Your Atom Feed as a Sitemap
If you have Google'd your own site, you may have noticed that not all of your individual Blog posts have been indexed. One way to help this along is to provide the Google webcrawler with a sitemap. A sitemap is an XML document that tells the crawler how to properly index all the pages on your site. As Blogger users, we cannot write our own sitemap file, but we can use our Atom Feed as a sitemap.

To begin, sign into Google Webmaster Tools using the same Google account that you use for Blogger. Follow the on screen instructions to verify your Blog. Once you've finished that, click on the "Sitemaps" tab, then the "Add Sitemap" button. Select "Add General Web Sitemap" from the pulldown menu, type in "atom.xml" for Step 3 and click "Add Sitemap". Google will now be able to use this information to index your site properly.

Current Issues
I so far have not been able to figure out is how to redirect the "Subscribe to Posts" link at the bottom of the page to Feedburner.
UPDATE: Fellow blogger Juls came up with this excellent way to redirect your main page Feed footer while preserving your comment feed! Locate this block of code:

And replace it with:

Conclusion
This is by no means a perfect trick, but I think it's a decent way to work around the current Feedburner integration problems and still make use of Feedburner and a Google Sitemap. If you have suggestions, problems or ideas, please feel free to leave a comment.

Labels: ,

26 Comments:

  • Thanks for the information. It was very helpful for me.
    I posted this in my blog (in Spanish).
    I didn’t change this line:
    <b:include name='feedLinks'/>
    because if you change it, in the posts’ pages won’t appear the “Subscribe to: Post Comments (Atom)” link any more, but if you put this line:
    <b:if cond='data:blog.pageType == "item"'>
    like this:
    <b:includable id='feedLinksBody' var='links'>
    <b:if cond='data:blog.pageType == "item"'>
    <div class='feed-links'>
    <data:feedLinksMsg/>
    <b:loop values='data:links' var='f'>
    <a class='feed-link' expr:href='data:f.url' expr:type='data:f.mimeType' target='_blank'><data:f.name/> (<data:f.feedType/>)</a>
    </b:loop>
    </div>
    </b:if>
    </b:includable>
    Only disappear the “Subscribe to: Posts (Atom)” link in the home page.
    http://blogdejuls.blogspot.com/2007/07/google-sitemap-y-feedburner-en-blogger.html

    By Blogger Juls, At July 21, 2007 at 9:51 PM  

  • Thanks for the tip, that's a good idea.

    For the moment I think I'll leave things as they are, since I doubt anyone is subscribing to my post's comments' feed currently. If my blog grows, however, I'll go back and add in what you wrote here.

    By Blogger Matthew Gallant, At July 21, 2007 at 10:00 PM  

  • Great idea!!!
    I put my code like this and it’s working:
    <b:if cond='data:blog.pageType == "item"'>
    <div class='feed-links'>
    <data:feedLinksMsg/>
    <b:loop values='data:links' var='f'>
    <a class='feed-link' expr:href='data:f.url' expr:type='data:f.mimeType' target='_blank'><data:f.name/> (<data:f.feedType/>)</a>
    </b:loop>
    </div>
    <b:else/>
    <div class='feed-links'>
    <data:feedLinksMsg/>
    <b:loop values='data:links' var='f'>
    <a href='http://feeds.feedburner.com/blogdejuls' target='_blank'>Entradas</a>
    </b:loop>
    </div>
    </b:if>

    By Blogger Juls, At July 21, 2007 at 10:58 PM  

  • That's a much better idea than what I had suggested, thank you very much!

    By Blogger Matthew Gallant, At July 21, 2007 at 11:16 PM  

  • Hello. Thank you for your post. Sorry for my previous comment deletion. It did not work :-)

    So, I think I've found another solution of the sitemap problem.

    I switched on feedburner redirection and added URL http://MYBLOG.blogspot.com/rss.xml?orderby=updated to Google Webmaster Tools as a sitemap. It's interesting that blogger makes redirect from rss.xml and does not make redirect from rss.xml?orderby=updated.

    Google has checked the sitemap and now it has "OK" status.

    How do you think, will such trick work properly?

    By Blogger 1, At September 4, 2007 at 12:22 PM  

  • That's a really great trick Lamer. As far as I'm aware any properly formatted XML file will work with Google sitemaps, so what you did should work perfectly. I may edit my post and add your idea to make it more visible (crediting you properly of course).

    By Blogger Matthew Gallant, At September 4, 2007 at 11:27 PM  

  • I'm very glad that my comment was useful.
    Moreover it is working! Today Google indexed my blog successfully.

    By Blogger 1, At September 5, 2007 at 9:14 AM  

  • Lamer, my rss.xml still redirect to feedburner and still have the same URL error. It doesn't work.

    By Blogger ChampDog, At September 5, 2007 at 9:59 AM  

  • Champdog, didn't you forget an addition "?orderby=updated" after your rss.xml URL?

    As you can see I've added also "atom.xml?orderby=updated" to my sitemap list and it also has status="OK".

    As for your blogs (I've looked those mentioned in your profile) you have NOT redirection on this URLs:

    http://softwaretracker.blogspot.com/rss.xml?orderby=updated
    and
    http://financialindependent.blogspot.com/rss.xml?orderby=updated

    Those URLs are not redirecting to feedburner.

    By Blogger 1, At September 5, 2007 at 5:11 PM  

  • Seems to work! Thanks, everybody!

    By Blogger Kermit, At September 6, 2007 at 12:51 PM  

  • Thanks for the http://YOURBLOG.blogspot.com/rss.xml?orderby=updated tip. I just did that hopefully it works.

    By Blogger Tim Broder, At September 12, 2007 at 4:46 PM  

  • Glad to be of service!

    By Blogger Matthew Gallant, At September 12, 2007 at 8:52 PM  

  • Lamer, it is working now. Thanks a lot for your help. Great post you have!

    By Blogger ChampDog, At September 16, 2007 at 7:19 AM  

  • so will this work if you are using blogger to ftp your blog to your own domain? if so, how would you write the url for the redirect?

    By Blogger david mejias, At September 17, 2007 at 12:50 AM  

  • That's a much trickier question David, but I'll try and help you as best I can.

    Why don't you try using http://newclimber.com/climb/atom.xml?orderby=updated as a sitemap, and tell me if Google accepts it without any errors. If it does work, then you can most likely redirect your main feed to feedburner (via the Dashboard) without any problems.

    I've made a few assumptions here about how Blogger works with your own domain, so let me know if any part of what I said doesn't work.

    By Blogger Matthew Gallant, At September 17, 2007 at 6:54 PM  

  • Ah!!!

    Thanks!

    Ever since I redirected to Feedburner, I've lost 90% of my google traffic, while they say it doesn't matter if your sitemap generates error, it did happen shortly afterwards.

    Thanks a lot for this tip!!

    By Blogger All The Music News, At September 28, 2007 at 9:32 PM  

  • I think I've found a limitation of my method (adding http//blog/rss.xml?orderby=updated as a sitemap). This method posts to google only 26 newest URL but not all the posts!

    I do not know does this feature make any proplem to crowler and how to workaround this.

    What do you think about this issue?

    By Blogger 1, At October 17, 2007 at 10:06 AM  

  • Hmmm, that's rather tricky. Since I don't know how Google treats sitemaps internally, I'm not sure what effect this limitation will have on it.

    Would you kindly let us know what happens to your site's indexing?

    By Blogger Matthew Gallant, At October 18, 2007 at 8:24 PM  

  • Hello.

    As you can see my site is probably fully indexed (including very old posts). But I have an idea why is it so. I installed the "Message archive" widget and turned on "Message pages" feature in blogspot. So, google crawler can see links on all my posts on every page of the site.

    By Blogger 1, At October 19, 2007 at 1:30 AM  

  • Hmmm, still very much a tough call. Without seeing the inner workings Google crawler is a black box, so it's hard to tell what will work beyond trial and error.

    If all of your pages are indexed, you should be fine for now. I'm curious about this "Message Archive" widget though, but I can't get any hits on that specific name. Would you happen to know the english name of the widget?

    By Blogger Matthew Gallant, At October 19, 2007 at 7:11 PM  

  • Sorry, did not even imagine that switching Blogger interface to English could be so difficult for me.

    So, I hope that "Message Archive" = "BlogArchive" widget. Your blog is also using this widget.

    By the way, Blogger is using RSS feed as provided sitemap for crawler. For example: http://quixotic-engineer.blogspot.com/robots.txt.

    By Blogger 1, At October 20, 2007 at 2:16 AM  

  • This limitation (the 26 URLs) seems to happen also with ordinary atom.xml sitemaps. Do you know an easy way by which I might overcome it? (my blog works with blogger).
    Thanks for your useful information.

    By Blogger Kermit, At October 20, 2007 at 5:21 AM  

  • 2kermit: Sorry, no ideas.

    By Blogger 1, At October 20, 2007 at 8:16 AM  

  • If the "updatedby" feed and the regular atom feed share the same limitation (26 posts), then using the "updatedby" feed for a sitemap should work just fine.

    As Blogger users, we are unfortunately denied the freedom to make our own sitemaps, so using our RSS feed is the next best thing. Google has thus far done a great job of indexing my pages, so if you're using either one of the methods I described in my post you should be fine!

    By Blogger Matthew Gallant, At October 20, 2007 at 11:54 AM  

  • By Blogger 1, At October 28, 2007 at 4:42 PM  

  • Seems to be working! Thanks, Lamer!

    By Blogger Kermit, At November 7, 2007 at 5:09 PM  

Post a Comment

Subscribe to Post Comments [Atom]



<< Home