blog
HOME · CREATIVE · WEB · TECH · BLOG

Sunday, April 15th, 2007

Keep Control of Your Feed Subscribers AND Use FeedBurner

One of the things Rick Klau of FeedBurner recommended in his presentation at the SEO Using Blogs & Feeds session at Search Engine Strategies New York was to have your auto discovery tags point to URLs on your server and then redirect users to FeedBurner. This is not the way they suggest on their setup pages, and this only works when you can set a conditional redirect on your server (see comments by Rick Klau below).

The reason that doing this is important is because you want your subscribers to subscribe to a URL you control, otherwise you may lose your subscribers if you move to a different feed service.

HOWEVER, this method doesn't work completely. Anyone who reviews the feed before subscribing to it (e.g. people using Firefox) will subscribe to the FeedBurner URL, not your URL. However, it will help with automated bots and it can help with any of the "chicklets" (the little icons for things like My Yahoo! and Bloglines) you may have on your page.

I've just made the change here and below you can see how it was done. If you're running Apache you can copy this code and do the same on your site...

In the VirtualHost file you'll need to set up a redirect. You want it to be a temporary redirect since the idea is that at some point in the future you might want to use a service other than FeedBurner.

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} !(feedburner|googlebot|slurp|msnbot|teoma) [NC]
RewriteRule ^/blog/atom\.xml$ http://feeds.feedburner.com/slicksurface [R=302,L]

Let's go over that quickly...

If you already have a line that says "RewriteEngine On" you don't need another, but it has to come before the other lines.

The RewriteCond line says that FeedBurner and the 4 major search engines will not get redirected to FeedBurner. Why you have to do this for the FeedBurner spider is obvious - you can't redirect it to itself. The other bots are included because you may use your feed as a "sitemap" and sitemaps have to be served from the directory (or a parent directory) for the URLs they list. An Atom/RSS feed isn't the same as a sitemap feed, but both Google and Yahoo! let you use it in the place of a sitemap feed.

The last line specifies the location of your feed on your server and on FeedBurner. You'll want to change these to suit your situation. Notice the redirect is a 302 temporary redirect.

Next, you need to change the auto discovery tags in your pages. In our case they now look like this:

<link rel="alternate" type="application/atom+xml" title="Slicksurface - Tech, Design & SEO Blog" href="http://www.slicksurface.com/blog/atom.xml">

Next you need to update the links you have in the "chicklets" you have on your site - make sure the feed URL you specify is the one on your site - the redirect will ensure that they actually get the one from FeedBurner.

Tags: , , ,
Categories: Feeds, Web Site Configuration

2 Comments

  1. Rick Klau Says:

    Jay – Thanks for posting about this, and for sharing the specifics of your setup.

    Thought I’d clarify one thing – why my comments at SES conflicted (slightly) with our published instructions. Since some blog platforms (like Google) don’t have a mechanism for doing any redirection at the server level, we don’t make that an absolute recommendation in our setup instructions.

    That said, when we encounter an environment that provides that level of control, we absolutely encourage them to publish *their* URL as opposed to ours. (WordPress, TypePad, Drupal are a few that come to mind.)

    Hope that helps – and please let us know if there’s other stuff we can do to improve FeedBurner. Keep in touch!

    –Rick Klau
    VP, Publisher Services
    FeedBurner
    rickk@feedburner.com
    AIM/Y!/Skype: RickKlau

  2. Jay Harper Says:

    Rick – Thanks for the clarification.

    Yes – this only works when you have something close to full control over the server.

Leave a Reply

HOME · CREATIVE · WEB · TECH · BLOG