Redirect WordPress Feeds to Feedburner via htaccess (Redux)

Posted on March 25, 2008 in Function, WordPress by

[ ~:{*}:~ ] In a previous article, I explain how to redirect your WordPress feeds to Feedburner. Redirecting your WordPress feeds to Feedburner enables you to take advantage of their many freely provided, highly useful tracking and statistical services. Although there are a few important things to consider before optimizing your feeds and switching to Feedburner, many WordPress users redirect their blog’s two main feeds — “main content” and “all comments” — using either a plugin or directly via htaccess. Here is the htaccess code as previously provided here at Perishable Press:

# temp redirect wordpress content feeds to feedburner
<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteCond %{HTTP_USER_AGENT} !FeedBurner    [NC]
 RewriteCond %{HTTP_USER_AGENT} !FeedValidator [NC]
 RewriteRule ^feed/?([_0-9a-z-]+)?/?$ http://feeds.feedburner.com/perishablepress [R=302,NC,L]
</IfModule>

# temp redirect wordpress comment feeds to feedburner
<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteCond %{HTTP_USER_AGENT} !FeedBurner    [NC]
 RewriteCond %{HTTP_USER_AGENT} !FeedValidator [NC]
 RewriteRule ^comments/feed/?([_0-9a-z-]+)?/?$ http://feeds.feedburner.com/perishablepresscomments [R=302,NC,L]
</IfModule>

The first code block redirects main content feeds to Feedburner, while the second block does the same for the main comments feed. The only editing required for either of these redirects is for the Feedburner URL itself; that is, edit the “http://feeds.feedburner.com/perishablepress” and/or “http://feeds.feedburner.com/perishablepresscomments” to match your own address. With this htaccess code in place, your feeds will be redirected to Feedburner for everyone except FeedValidator and of course Feedburner itself. To add additional exceptions to the redirect, simply replicate either line containing RewriteCond, and edit the user agent (e.g., FeedBurner) to suit your needs. Of course, if you plan on using both of these redirects (i.e., all content and comment feeds), continue reading for a better technique..

New and Improved Method for Redirecting WordPress Feeds to Feedburner

For those of us using Feedburner for all content and comment feeds, we have consolidated the previous htaccess code into a single redirect. Additionally, we improve functionality by verifying the requested URI and simplifying the regex used to match the target string. Check it out:

# temp redirect all wordpress feeds to feedburner
<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteCond %{REQUEST_URI}      ^/?(feed.*|comments.*)        [NC]
 RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner|FeedValidator) [NC] 
 RewriteRule ^feed/?.*$          http://feeds.feedburner.com/perishablepress         [L,NC,R=302]
 RewriteRule ^comments/?.*$      http://feeds.feedburner.com/perishablepresscomments [L,NC,R=302]
</IfModule>

If you are redirecting both content and comment feeds, this “new and improved” htaccess code will do the job nicely. With optimized code and improved functionality, it is definitely recommended over the previous directives. Simply edit the URLs in the last two lines to match your own Feedburner addresses (one for posts and the other for comments), and place the code into your blog’s root htaccess file. No other changes should be required. Once the code is in place, test that everything is working by accessing your feed directly using its default (i.e., non-redirected) URL. After that, you can sit back, relax, and enjoy all the benefits of WordPress, Feedburner, and one less plugin to worry about.

<update> (12/15/2008) If either of your feeds will not redirect using the “new and improved” redirect code, try commenting out the following line:

RewriteCond %{REQUEST_URI} ^/?(feed.*|comments.*) [NC]

..and that should do the trick. Or, another option is to use the two “original” redirects provided in the beginning of this article. </update>

Translations

Belorussian translation

Related articles

61 Responses

  1. [ Gravatar Icon ] Sumesh says:

    Good post, and thanks for the htaccess code.

    I’m a performance enthusiast myself, and couldn’t find any reason to keep FeedSmith when similar redirects are handled by htaccess. Only, I couldn’t get hold of the required code. Now I have :D

  2. [ Gravatar Icon ] Perishable says:

    Thanks for the feedback, Sumesh! I am glad you found the code useful. It is amazing how many plugins are actually unnecessary for people who take the time to improve the performance of their site. One less plugin slowing things down is always a good thing! ;)

  3. [ Gravatar Icon ] Evan says:

    Thank you, sheesh, you’d think that getting something like this set up was supposed to be a secret or something. Even the so called “how to’s” on the feed burner site are convoluted and difficult to follow… not to mention over 2 years old.

    This was easy to follow, understand and install.

    Thanks again!

  4. [ Gravatar Icon ] Perishable says:

    I totally agree, Evan — trying to decipher the Feedburner documentation for this technique is like driving without a car, somehow terribly futile and frustrating. And that is precisely the reason for this article. I am glad you found it useful! Thanks for the feedback :)

  5. [ Gravatar Icon ] rukeba says:

    Thanks! But this .htaccess may be applied to other non-wordpress feeds for redirecting to feedburner.

  6. [ Gravatar Icon ] Perishable says:

    Yes, the redirect technique described in the article could very well be adapted to non-WordPress sites (i.e., WordPress is not required for them to work). So long as the rewrite directives target the correct URLs, this method should prove most effective. Thanks for the reminder!

  7. I have a couple of doubts -
    1) Can this be used for WP 2.5? (FeedSmith doesn’t work for 2.5 anyway)

    2) Should I place this code before or after the WordPress rules?

  8. [ Gravatar Icon ] Perishable says:

    Hi Sumesh, I have not yet tested this method with WordPress 2.5, but I think it will work just fine. As far as I know, WP 2.5 still uses the same permalink structures as previous versions. The FeedSmith plugin uses PHP to handle the feed redirects, and thus may not work if WP 2.5 has changed the PHP mechanism by which canonical redirects are produced. Conversely, the htaccess method should not be affected by such changes as it operates independently of PHP scripts (generally speaking). In any case, the best way to find out is to upload a copy (place anywhere in root/blog htaccess) and give it a shot. Good luck! ;)

  9. [ Gravatar Icon ] Florian says:

    Thanks for the snippet.
    I had to place the code before the wordpress permalink rules. It didn’t work after the wordpress rules.

  10. [ Gravatar Icon ] Jeff Starr says:

    Thanks for the tip, Florian! :)

  11. [ Gravatar Icon ] Ipstenu says:

    Thank you! Feedburner’s been ticking me off, not updating right, for a while. I had to turn off Bad Behavior, fix the .htaccess, then change the feed, and THEN it worked. Sheesh. I’m tempted to go back.

    FYI, I also added in |rss.* to the REQUEST_URI line, and duped the rewrite for ^feed as ^rss to get site.com/rss to redirect too. Wicked easy!

  12. [ Gravatar Icon ] Jeff Starr says:

    Thanks Ipstenu, glad to hear you got it working.. also, matching and redirecting rss is keen — thanks for the tip!

  13. [ Gravatar Icon ] Marty Martin says:

    I’d like to be able to redirect the main blog and comments to feedburner, but preserve the WP RSS feed for my tags. Right now though, if I try to visit the RSS feed for a specific tag, it redirects me to feedburner’s main content feed for my site. I’m not much of a REGEX person. How would I accomplish this?

    A sample template RSS would be - http://www.foo.com/wp-rss2.php?tag=foobar

    Thanks for any suggestion!

  14. [ Gravatar Icon ] Jeff Starr says:

    @Marty Martin: Here is the code I use for this, placed directly before the WordPress permalink directives:

    # REDIRECT MAIN AND COMMENT FEEDS TO FEEDBURNER
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner|FeedValidator) [NC]
    RewriteRule ^feed/?$ http://feeds.feedburner.com/yourmainfeed [L,NC,R=302]
    RewriteRule ^comments/feed/?$ http://feeds.feedburner.com/yourcommentfeed [L,NC,R=302]
    </IfModule>

    Replace the yourmainfeed and yourcommentfeed with your main feed and comment feed, respectively. Upload to your blog’s root htaccess file and you should be good to go!

  15. [ Gravatar Icon ] Alexander says:

    Great tutorial, however I would like to redirect all my category feeds through feedburner, say I already had the feedburner feed created for each category, would inserting redirects for all my categories on the .htacces slow down my page loading?

    I asume the process for the categories RSS is the same as for the content and comments redirection, say I have a “Google” category, I assume wildcards are usable here (newbie modifiyng an .htacces ^^)

    The google feed is:
    http://www.tecnovits.com/category/google/feed

    So on the REQUEST_URI I could modifiy it like this so it would permit all my categories:
    RewriteCond %{REQUEST_URI} ^/?(feed.*|comments.*|category/*/feed.*) [NC]

    And the redirect would be something like:
    RewriteRule ^category/google/feed/?.*$ http://feeds.feedburner.com/tecnovits-google [L,NC,R=302]

    So the whole thing would be like:

    # temp redirect all wordpress feeds to feedburner

    RewriteEngine on
    RewriteCond %{REQUEST_URI} ^/?(feed.*|comments.*|category/*/feed.*) [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner|FeedValidator) [NC]
    RewriteRule ^feed/?.*$ http://feeds.feedburner.com/perishablepress [L,NC,R=302]
    RewriteRule ^comments/?.*$ http://feeds.feedburner.com/perishablepresscomments [L,NC,R=302]
    RewriteRule ^category/google/feed/?.*$ http://feeds.feedburner.com/tecnovits-google [L,NC,R=302]

    Would be really helpful if anyone could check this for me, before I modify the .htacces
    Thank you.

  16. [ Gravatar Icon ] Jeff Starr says:

    @Alexander: Firstly, depending on the number of categories you have, implementing htaccess redirects for each of them should result in no noticeable difference in page-loading times. Each directive included in your htaccess file(s) does require an extra bit of processing, but unless you have an large number of categories (or a slow server), performance should not be affected by much.

    Secondly, when it comes to htaccess, a wildcard operator is specified by a literal dot ( . ), which will match any character in the target string. Further, to match any number of any type of character, an asterisk ( * ) is placed after the dot, like this: ( .* ).

    Lastly, the example RewriteCond that you specify will match against category feeds even without the extra expression, “category/*/feed.*”, due to the presence of the first “feed.*” statement. That is, any string matched by the second expression will also be matched by the first.

    Other than that, it looks like your code will work just fine, although I haven’t tested it for myself, so I am hesitant to say for sure. Just remember to change the feed URLs to yours instead of mine! ;)

  17. [ Gravatar Icon ] Alexander says:

    Thanks for the heads up!
    I actually tested it and it worked fine, I also followed your advice and removed the condition and everything well, also no noticeable slow down.

    Thank you.

    PD: Although in an ironic twist of fate I stopped using feedburner in the morning due to bad service by them. :P

  18. [ Gravatar Icon ] Michael says:

    Hello! This is a great tip for redirecting feeds… I am hoping there is a way to use the rewrite when using “Domain Mirror” — having two domains on the same WP install.

    Is there some way to change ^feed/?.*$

    To be like ^firstdomain.com/feed/?.*$
    and ^secondomain.com/feed/?.*$

    Is it as simple as that? Or does the ^ character mean something else?

    I’d appreciate any insight on this, thanks.

    - Michael

  19. [ Gravatar Icon ] Jeff Starr says:

    @Michael: The carat symbol ( ^ ) is used to denote the beginning of a string. It essentially says, “begin your pattern match at this point.” I am not familiar with “Domain Mirror,” but I understand the concept. Assuming both domains are located on the same server, the modified redirect code may indeed be as simple as you suggest, although I have not tested myself. Use caution when testing, of course. ;)

  20. Thanks for posting this. It got me 90% of where I wanted to be…

    The problem I needed to solve after migrating from Blogger to WordPress was redirecting subscribers from http://blog.bstpierre.org/feeds/posts/default (the old Blogger feed) to http://blog.bstpierre.org/?feed=atom.

    So I was adding a rule like:

    RewriteRule ^feeds/posts/default$ http://blog.bstpierre.org/?feed=atom [L,NC,R=301]

    But the rules above were firing instead, because “?” is a special character that means “match 0 or 1 of the preceding” thus “feed/?.*” matches “feeds…” and steals my redirect.

    I think what you really want is:

    RewriteRule ^feed/[?].*$ http://feeds.feedburner.com/perishablepress [L,NC,R=302]

  21. [ Gravatar Icon ] Jeff Starr says:

    @Brian St. Pierre: Yes, this technique is designed to redirect WordPress-formatted feeds to their Feedburner counterparts. Adjustments may be required to account for the subtle differences in syntax for alternate feed URLs (e.g., Blogger feeds). For WordPress, however, the method is sound, and used successfully on many sites.

    As for the literal question mark, it is not used in this technique as we are targeting permalink-formatted WordPress feeds. The optional match character (“?”) is used primarily to account for the presence (or absence) of a trailing slash on the feed URL(s).

    For redirecting non-permalink WordPress feed URLs, we target the various query strings themselves rather than using a literal question mark (as described in your comment). For more information on this, check out this article.

  22. [ Gravatar Icon ] Patrix says:

    I’m using FeedBurner and the Feedsmith plugin for my filter blog, DesiPundit. I found your post via the WordPress page for RSS feeds and this definitely looks much better.

    But I’ve a question. I have three sections on my blog; Community where I present (in excerpt form) syndicated feeds from other veteran bloggers, New & Upcoming where I link to posts from bloggers not in the first section with a short personal description of the link, and finally Featured which is kinda the best of the first two sections. Now my problem is that I want to offer full feeds but if I do, the posts in the first section show full feeds of the bloggers that I syndicate which may not be right as I want readers to click through to their blogs. But I don’t mind showing full feeds for the second section which is a short description of the link anyway and readers do click thru.

    So my question is, how do I offer partial feeds for one main category and its sub-categories while offering full feeds for the other category? The sections are defined by three parent categories. I would really appreciate if anyone has a solution.

  23. [ Gravatar Icon ] Simon says:

    I was trying to get this to work for a few hours, didn’t quite redirect in the end. How can I just redirect the main feed to (domain/feed) to the feedburner feed? So I can still use all the other feeds for individual purposes?
    Cheers and have a great evening

  24. [ Gravatar Icon ] Jeff Starr says:

    @Patrix: Unfortunately, we can’t use HTAccess to control whether or not a feed is full or partial, however, I do recall seeing a plugin called “Feed Control” (or something similar) that provides granular control over the formatting of your various feeds. If you can’t find a plugin or function to do the job, you may want to try experimenting with Yahoo! Pipes, which is a feed aggregator that enables the creation of custom feeds, formatting, and so on.

    @Simon: Great to see you again! The technique described in the article should do exactly what you need. Make sure you read the update note at the end of the post if you are experiencing any issues.

  25. [ Gravatar Icon ] Simon says:

    Hi Jeff, same here! It seems your blog always holds the answers to some of my questions :)
    Thanks for the fast response. I think I tried everything but it never redirects anything. I just put it in the httaccess right? Maybe below # END WordPress or fo i put it in there?
    Cheers Simon

  26. [ Gravatar Icon ] Jeff Starr says:

    @Simon: Before the WordPress permalink rules! And, be sure that you try this method as well:

    <IfModule mod_rewrite.c>
       RewriteEngine on
       RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner|FeedValidator) [NC]
       RewriteRule ^feed/?.*$ http://feeds.feedburner.com/yourfeed [L,NC,R=302]
    </IfModule>

    If that doesn’t work, there may be something else that is interfering..

  27. [ Gravatar Icon ] Simon says:

    Juhui (swiss exclamation of joy)! Works like a charm. One less plugin in my neverending list. You’re a genious the last one workes perfectly. :)

  28. [ Gravatar Icon ] Jeff Starr says:

    Excellent! Happy to help, Simon! :)

  29. Jeff, I hope you don’t mind me troubling you for a moment, but this is far from my area of expertise. Your first set of code above works great for me. It always has.

    I have one feed in particular that I need to exclude from being redirected (http://justintadlock.com/feed/wordpress-o-sphere), which is a custom-created feed. I don’t need it redirected at all, but I’d like to redirect everything else.

    The rewrite rule currently is:

    RewriteRule ^feed/?([_0-9a-z-]+)?/?$ http://feeds2.feedburner.com/JustinTadlock [R=302,NC,L]

    I usually figure these things out pretty quickly, but I’m stuck on this one. If you have a moment and know how to do this, I’d appreciate it if you’d lend a hand. I’ve got a tutorial coming up on creating custom feeds, but I can’t show off the feed because it’s being redirected to Feedburner.

  30. [ Gravatar Icon ] Jeff Starr says:

    Sorry for the delay on this - had my wisdom teeth out and things got quite hectic..

    That is tricky one for sure, but a few things come to mind that might be of some help..

    1) If at possible, use a different directory for the custom feed. Your current rewrite rule would then skip the custom-feed directory, enabling you to simply create a new rule for it.

    2) Depending on how many feeds you have at your site, exchange the wild-card pattern-matching for a specifically targeted list of feeds (e.g., any feed that actually goes to Feedburner). As with the first option, this would enable you to target as many custom feeds as needed.

    3) In general, rewrite directives for excluding requests for specific patterns that are included subsequent conditions is difficult. You may have luck using mod_rewrite for the general pattern-matching directives and then mod_alias for the exclusive case (i.e., for the custom feed).

    I hope that proves useful - let me know if I may be of any further assistance.

  31. Thanks. I don’t know why I just didn’t think to change the name of the custom feed directory. That makes things super easy. Sometimes, it just takes a fresh set of eyes to find the simplest things.

  32. [ Gravatar Icon ] Jeff Starr says:

    Anytime, Justin! Your articles have helped me on many occasions — more than happy to return the favor :)

  33. [ Gravatar Icon ] Agus Suhanto says:

    Thanks for the .htaccess code.

    I just wondering why we don’t use the following rewrite rule for the comments feed:

    RewriteRule ^comments/feed/?.*$ http://feeds.feedburner.com/comments-feed [L,NC,R=302]

    because if I use ^comments/?.*$, it will also match the url:

    http://domain.tld/comments-feed

    which I suppose should be use by a WP page?

    Looking forward for your response.

    regards,
    Agus Suhanto

  34. [ Gravatar Icon ] Jeff Starr says:

    Hi Agus, yes you should include the extra match information to keep the rules targeted on your feed page only. It is a good idea, but test like crazy to make sure everything is working as expected.

  35. [ Gravatar Icon ] Regan Frank says:

    Hi,

    Just wanted to say thanks for this hack. I really needed something to work for me and your code was a god send. Thanks

  36. Hi Jeff, thank you for the useful post, this is exactly what I was looking for.

    I ran into one thing I had to change to get this to work on my server (Apache 2.2.3), and I wanted to bring it up because I wonder if you or others have run into it. It has to do with whether the REQUEST_URI includes a leading slash. In my setup, the REQUEST_URIs do come in with the leading slash. In your code, you add a conditional check for the presence of a leading slash in your first RewriteCond, but then that check is absent in the RewriteRule - this is what caused the rule to be skipped in my server configuration. Do the grouping parentheses you include parse that out for subsequent checks?

    Here’s what I settled on (only for main feed):

    # FeedBurner support.
    RewriteCond %{REQUEST_URI} ^/feed.* [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner|FeedValidator) [NC]
    RewriteRule ^/feed.* http://feeds.feedburner.com/entersection [L,NC,R=302]

    Thank you, and btw your blog’s design is really beautiful. Makes me think you must live in the southwest U.S. somewhere :)

    gf

  37. [ Gravatar Icon ] Jeff Starr says:

    Hi Gregory, interesting indeed - that may explain why, on certain server configurations, that initial RewriteCond needs to be omitted, as mentioned in the “Update” at the end of the article. I will have to look into it further before I can say for sure what’s happening, but your information is certainly an eye-opener. Thanks.

  38. Hi Jeff,

    Thank you, that’s exactly what I am looking for, since none of the feed re-direct WP plugins seem to work anymore with WP 2.8.

    Unfortunatly your script does not work for me, I tried all the different version of this script and nothing is redirected i.e.

    RewriteEngine on
    RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner|FeedValidator) [NC]
    RewriteRule ^feed/?.*$ http://feeds.feedburner.com/bentographics [L,NC,R=302]

    It’s a feature I’d love to add to my site. Any ideas how to make this work?

    Is there some kind of special server configuration needed? I can set rewrite rules for Wordpress, that works fine though.

    Thanks for any pointers!

  39. [ Gravatar Icon ] Jeff Starr says:

    @Benjamin Thomas: not sure what the issue might be, but one thing that you may want to check is that the rules are placed before the WordPress rules. Also, the various redirect plugins should be working with the latest version of WordPress, so if they aren’t working in your situation, there may be some underlying issue that needs investigating.

  40. [ Gravatar Icon ] Richard says:

    Hi - I redirected my rss feed to feedburner a while ago and for the life of me I cannot figure out how to stop it from redirecting. I deactivated and then deleted the feedburner plugin, but it still redirects, so I’m figuring I must have changed some code somewhere.

    My .htaccess file has the standard configuration for permalinks:

    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]

    Nothing about feedburner in here, so I’m not sure why its still redirecting. Any ideas would be immensely appreciated.

    Thanks!

  41. [ Gravatar Icon ] Jeff Starr says:

    Hi Richard, a few things that you might want to try:

    • Check the htaccess files for your root directory and your subdirectory
    • Check for any plugins that may be redirecting your feed
    • Implement another redirect to see if your htaccess is working properly

    Those are just a few things off the top of my head..

  42. [ Gravatar Icon ] Brian says:

    Thanks for the .htaccess code! I tried using the “new and improved” method, however, the redirects work for users but not Feedburner.

    My main feed works perfectly. But for the comments feed, Feedburner is getting redirected also, so it does not syndicate new comments.

    Currently, I’m using the original method but I would like to try the new and improved method.

  43. [ Gravatar Icon ] Justin says:

    Hey Jeff, any tips on redirecting feeds to feedburner in prep of a site launch? I’m wondering about having the site blocked to the public, but allowing the feedburner redirects to go through for testing.

    Would this just be a matter of combining these with some conditional statements to allow the site feeds by a basic .htaccess redirect

  44. Nice tip. I will use it on my blog. Thanks… :wink:

  45. [ Gravatar Icon ] paolo says:

    Hi Jef,

    Before reading this post I was getting crazy to try to redirect my main content feed to feedburner with the different plugin. Nothing worked (I use Worpress 9.2.1).

    Now I can redirect to feeburner but if I choose (from feeburner) the standard ‘View Feed Xml” I cannot see the usual XLM page but I am redirect again to the feeburner page (and I cannot see any more the ling “View Feed Xml”.

    Have you an advise to have this basic function in place?

    Thanks
    Paolo

  46. [ Gravatar Icon ] paolo says:

    Sorry Jeff,

    just a little add. I have the same problem when I tried to subscribe to your
    “View Feed XLM”.

    Thanks
    Paolo

  47. [ Gravatar Icon ] paolo says:

    Me again Jeff,
    I discovered that the problem is with Internet Explorer 8.
    In the Feeburner Help Group the problem has already been logged but until now (since may of last year) nobody has found a solution.

    Ciao
    Paolo

  48. [ Gravatar Icon ] Jeff Starr says:

    Hi paolo, I wouldn’t worry too much about it. Just try emphasizing a working URL for your feeds and you should be fine. I doubt that too many people ever click on the XML button when viewing your Feedburner feed.

  49. [ Gravatar Icon ] Eric says:

    Very nice tutorial. I use this method to redirect my blog feed to feedburner and it works perfect. Thanks!

  50. [ Gravatar Icon ] David Young says:

    I’m still a little confused about all this…

    I’ve got the .htaccess file updated, when I go to my site’s feed url (samplesite.com/feed) it redirects to the FeedBurner URL (feeds.feedburner.com/samplesite) and then takes me to the FeedBurner page that prompts me subscribe to the feed. But… if I look at the URL it will subscribe to, it points to the FeedBurner URL, not my site’s URL:

    http://fusion.google.com/add?feedurl=http://feeds.feedburner.com/samplesite

    Which seems to make people subscribe to the feedburner url - not my url.
    Am I doing something wrong?

  51. [ Gravatar Icon ] Jeff Starr says:

    @David: If I understand you correctly, I think that’s just how it’s supposed to work. Once you setup the redirect, the Feedburner URL will be the one that is used when people subscribe to your feed. You can use your site’s original feed URL in the various “Subscribe to” links around your site, but once someone clicks on one of them, it will be redirected to the Feedburner URL. I hope this makes sense. You can read more about it here: Serve Yourself: Why Feedburner Needs a Feed Fix.

  52. [ Gravatar Icon ] David Young says:

    Hi Jeff-

    Thanks for the reply.

    I think I found the answer to my problem.

    My issue was that I didn’t want people to ever subscribe to my FeedBurner feed. That way, if for some reason I stopped using FeedBurner I wouldn’t loose my subscribers.

    The solution was, in addition to your .htaccess redirect — to on the FeedBurner page, go to Optimize -> Browser Friendly and then in the area where it asks “Are you redirecting your feed traffic?” click on the link below and enter my website feed url into the “Redirected Feed URL” field.

    This way, even though they use feedburner, and it tracks my subscribers - their feed url is still pointing to my original site’s url.

  53. [ Gravatar Icon ] Jeff Starr says:

    David, very nice! That must be a newer feature, because it didn’t exist when I was cutting my own path through this territory a couple of years ago. It looks like it only works with the “BrowserFriendly” feed format, but it’s certainly nice to see Feedburner provide this functionality to their users.

    Thanks again — I’ll be trying it out and sharing my discoveries here at Perishable Press.

  54. [ Gravatar Icon ] wencent says:

    Hello ,

    This is quite a useful tips for wordpress theme to change original rss url.

    But it didn’t work on my own theme .weird ! mm

    I have no idea but after changing .htaccess file with the code above and click

    through the rss on the theme itself and the ulr is still http://#####.com/feed

    the rss icon is at the footer part on my theme .And I have checked the

    footer.php and found it was encryption .Is that why it can not be redirected?

    Is there any sugesstion?

  55. [ Gravatar Icon ] Jeff Starr says:

    @wencent: Not sure, but keep in mind that we are only redirecting URL requests here. No changes will be made to any of your code, so you will need to do that yourself (using either URL is fine).

  56. [ Gravatar Icon ] brian says:

    Thanks so much for this! This was exactly what I was looking for (and surprisingly so hard to find)!

  57. [ Gravatar Icon ] Dan Entin says:

    So does this solve the problem of switching existing RSS subscribers using the default WordPress RSS feed URLs (from before you implemented FeedBurner) to using the FeedBurner feeds? One of my concerns with implementing FeedBurner was that it would only capture new subscribers because existing subscribers would have no reason to update their feeds to the new FeedBurner URL. Please let me know. Thanks!

  58. [ Gravatar Icon ] Jeff Starr says:

    Hi Dan, yes, using the htaccess method, any requests for either your actual feed URL or its Feedburner counterpart will be redirected to the Feedburner feed.

  59. [ Gravatar Icon ] Matthew Snider says:

    Has anyone noticed a slow show up on google reader after doing this? My feed updates within minutes if not sooner BUT in google reader it sometime shows hours later - it’s very very weird and basically a pain in the butt for my readers.

    I have things that I posted 4 hours ago and still nothing.

  60. [ Gravatar Icon ] Jeff Starr says:

    Hi Matthew, you may need to ping Feedburner to reset/rebuild your feed:

    http://www.feedburner.com/fb/a/ping

  61. [ Gravatar Icon ] Eric says:

    Nice tutorial. htaccess is a very powerful tool for website/blog hosting.