How to Redirect Drupal RSS Feed to Feedburner with Ease

In spite of running this blog for almost 2 years, I never added its feed to Feedburner, however I should have done this from the beginning. But bad memory did its evil job ;)

When you add your feed to Feedburner in return you get a new url for you feed like this http://feeds.feedburner.com/timonweb. And then you need to update rss feed url's on your Drupal site to this new one. Moreover, you can encounter with a problem: "What to do with previous subscribers, how to force them using Feedburner's feed?". You may want to do this, because Feedburner provides different cool addons to your feed such as click-through statistics.

Ok, doing this is pretty simple, just go to your Drupal root and find .htaccess file. Open it and somewhere at the top add this code:

## START: FeedBurner redirects
RewriteCond %{HTTP_USER_AGENT} !FeedBurner
RewriteRule ^rss.xml$ http://feeds.feedburner.com/timonweb [R=temp,L]
## END: FeedBurner redirects

Note changing 'timonweb' to your own Feedburner ID. From now on, everyone who uses your main Drupal RSS feed which looks like: http://somedrupalsite.com/rss.xml will be redirected to Feedburner processed RSS feed. That's all. No more code changes, no more jumping through the hoop. Enjoy your Drupal.

UPD: Please read comments section. People there gave good solutions for managing multiple feeds. Thank you all!

Comments

Submitted by Dave Reid on Tue, 2010-11-02 17:47

Of course anytime you update your Drupal core install you'll have to remember to re-add this section to your .htaccess file.

Or you could just manage in in the UI via the Feedburner module. :)

Submitted by Tim on Wed, 2010-11-03 17:11

In most cases, people save their .htaccess before update, coz it can contain different redirects, not only Feedburner. I think it is good practice to utilize less modules if you can, so if one has only one feed url to be redirected to Feedburner, then it's to do via .htaccess. Of course, if you have lots of feeds, feedburner module is a saver. Thanks for contribution here, Dave!

Submitted by Richard on Tue, 2010-11-02 18:02

You may want to consider the Feedburner module for Drupal, which lets you configure the redirect of any feed Drupal outputs to Feedburner, with the added benefit of not requiring edits to your .htaccess file. http://drupal.org/project/feedburner

Submitted by Jeff Geerling on Tue, 2010-11-02 18:28

If you have multiple feeds, it's much easier to administer their burning options through Drupal's nice Feedburner module.

For one or two feeds, this is a nice/lightweight alternative.

Submitted by Tim on Wed, 2010-11-03 16:57

Yeah, U're 100% right. I'm trying to avoid installing too much modules if something can be done quick and clean without them, but for many feeds this is a good solution!

Submitted by yaworsk on Tue, 2010-11-02 19:00

Thanks for the tip! I've gotta make the switch over to feedburner and this will help.
pete

Submitted by Tim on Wed, 2010-11-03 16:56

U're welcome :)

Submitted by Per on Tue, 2010-11-02 23:42

I'd recommend using the (free) MyBrand service to use your own domain instead of feedburner.com. By doing that you remain in full control over your feed URL.

http://www.google.com/support/feedburner/bin/answer.py?hl=en&answer=79586

Submitted by Tim on Wed, 2010-11-03 16:56

Wow! Never knew about that, thanks for the hint, will check this out.

Submitted by Dave Reid on Wed, 2010-11-03 17:00

The FeedBurner module also supports this feature too, just FYI. :)

Submitted by social workers on Tue, 2010-11-16 19:14

I’ve recently started a blog, the information you provide on this site has helped me tremendously. Thank you for all of your time & work.

Submitted by Tim on Wed, 2010-11-17 01:30

U're welcome and good luck with your blog!

Submitted by margaux on Tue, 2012-04-17 18:18

FeedBurner module is not available for D7 yet, but I didn't want to change .htaccess if I could avoid it. I was already using the redirect module, so I set up a 301 redirect from [mysite]/blog/rss.xml to my FeedBurner URL, and it worked like a charm. Something to consider for D7 sites.

Submitted by Tim on Wed, 2012-04-18 14:52

Thanks for the share, margaux!

Submitted by shyd on Thu, 2013-04-18 17:51

I came along because changes in my .htaccess doesn't seem to have any influences on the feed.
So I tried the redirect module. But in my case feedburner fetches its own feed on resync. But this is not wat I want.
Hope I can fix this...

Submitted by mrP on Thu, 2013-05-16 00:04

Should it be a 302 redirect?

Submitted by John S on Thu, 2014-01-16 10:25

Excellent. Thanks!

Add new comment

You are here