Moving and Retiring RSS Feeds - The RSS Blog
RSS, OPML and the XML platform.
Copyright 2003-5 Randy Charles Morin
The RSS Blog
<< Previous Main Next >>
Fri, 10 Nov 2006 18:21:11 GMT
Moving and Retiring RSS Feeds
OK, now for some really boring and really important stuff. What do you do with your old feed when you change blogs? Or what do you do with your old feed when you don't need it anymore. You don't want people polling those feeds till the end of time. Somehow, we have to tell RSS clients that you don't exist anymore. In RSS-ville, there's countless ways of doing this and most of them don't work anyway. As such, I'm writing yet another tutorial that RSS developers will likely ignore. I hate them :-( I hate them all ;-) But in case you actually care, here's how to move and retire an RSS feed. This is not new content and is also covered in the HowTo RSS Feed State article.

I'm gonna break this tutorial into two parts. The first part is when you want to move an RSS feed to another place, domain, blog, or whatever. The second part is when you don't care anymore and you want your readers to simply go away and free up some bandwidth.

Moving an RSS Feed

In doing my own testing, I put together a very dynamic RSS feed [] where all these various move operations will be moving to.  The first and most proper way of moving an RSS feed is to respond to the HTTP request with a 301 Permanent Redirect. I've prepared a small ASPX file [] that simulates exactly this type of response. The code for ASP.NET is shown.

<%@ page language="C#" %>
Response.Status = "301 Moved Permanently";

If you re-use this code, simply change the URL in the AddHeader call to the target URL where your RSS feed is moving to.

For the really geeky nerds out there, this is what a 301 redirect looks like at the wire level. The first two lines are the client request and the last four are the server response. I removed a couple headers that were irrelevant to the discussion.

GET /rss/test/http-301.aspx HTTP/1.1

HTTP/1.1 301 Moved Permanently
Date: Fri, 10 Nov 2006 17:55:11 GMT
Content-Length: 0

Of course, not everybody has HTTP level access to their website or the skill required to generate such a response. In those cases, you may want to consider an XML-level redirect. Here's a sample XML-level redirect []. The content of the file is shown below.

<?xml version="1.0" ?>

To use this technique simply download the xml-redirect.xml file. Then change the URL of the target RSS feed to the URL where your RSS Feed is moving to. You may have to escape some characters in your target URL. Change > to &gt; < to &lt; and & to &amp;. If you struggle with such escaping, then drop me an email []. Finally, rename the file to the same filename as your RSS feed and copy the file to your web server, replacing your old RSS file.

Again for the geekoids, here's what the XML-redirect looks like on the wire.

GET /rss/test/xml-redirect.xml HTTP/1.1

HTTP/1.1 200 OK
Content-Length: 121
Content-Type: text/xml
Last-Modified: Fri, 10 Nov 2006 16:21:37 GMT
Accept-Ranges: bytes
ETag: "2268c84be44c71:d84"
Date: Fri, 10 Nov 2006 17:57:19 GMT

<?xml version="1.0"?>

Assuming options A and B are not possible, the next best way is a 302 Temporary Redirect. But this method is really wasteful because the client software will continue to use the original URL and be redirected every-time to the new URL. Wasteful indeed. Here's sample temporary redirect []. If all of A, B and C are not possible, then a last option is to put a blog entry that specifically asks your readers to re-sub using the new URL.

Retiring an RSS Feed

Great, we know how to move an RSS feed, but just how do we go about killing one that is no longer required. The best way to tell a client that a feed is no longer used is to response with a HTTP 410 Gone response. Here's a sample 410 gone response [].

The ASP.NET code for a 410 gone response.

<%@ Page Language="C#" %>
Response.Status = "410 Gone";

And here's what it looks like on the wire.

GET /rss/test/http-410.aspx HTTP/1.1

HTTP/1.1 410 Gone
Date: Fri, 10 Nov 2006 18:02:32 GMT
Content-Length: 0

Some RSS clients will prompt the user to remove the feed when this response is encountered. Others will simply stop polling the feed or even unsubscribe the user without requiring any confirmation.

If you can't figure out how to do a 410 Gone response, then you can also use an XML-level redirect to accomplishes the same. Here's a sample XML-level redirect that tells the RSS client that the feed should be unsub'ed []. Note this XML-level redirect is similar to previous, except that no new RSS feed is provided.

<?xml version="1.0"?>

And finally, here's what a XML-level unsub looks like on the wire.

GET /rss/test/xml-gone.xml HTTP/1.1

HTTP/1.1 200 OK
Content-Length: 64
Content-Type: text/xml
Last-Modified: Fri, 10 Nov 2006 16:21:37 GMT
Accept-Ranges: bytes
ETag: "de1aba4be44c71:d84"
Date: Fri, 10 Nov 2006 18:10:18 GMT

<?xml version="1.0"?>

Notes: If anybody has PHP code or other similar to the ASP.NET code above, then feel free to post them in the comments. If you post them in the next few days, then I'll likely add them to the content of the original article. And a big thanks in advance.

Reader Comments Subscribe
That might probably the right thing to do. But for me your issues was one of the best I've read. Keep it up. fight dui
Accumulating much producing technology, Moncler Jackets have been popularized in many areas.
 we know how to move an RSS feed, but just how do we go about killing one that is no longer required
This is very usefull Create by: hallmark cards
Thank you very much for your articles. It is my opinion: Since 1934 the MNLA has existed to support, promote, and provide services and assistance to member businesses. We support all constituent groups of the horticulture industry, including landscape, garden centers, interiorscape, grounds maintenance, nursery, greenhouse, arboriculture, botanical gardens and other allied businesses. Post by: maryland landscapers
i am sure you spend a lot of time on doing this site! I'm really here to appreciate that you are a good blogger!!! Thank you! Post by: Baltimore landscape architect
I feel like I’m often looking for interesting things to read about a variety of subjects, but I manage to include your blog among my reads every day because you have interesting Post by: Click here
Oh God you are a genius person and a good photographer i like your pics thank you. Post by: landscaping in Maryland
Thank you for your topic, Post by: Landscapers in Sykesville
You may want to reach for an outside support team if your organization is undergoing significant changes in managerial structure subsequent to poor performance or other shortcomings on the part of those who were "at the top." In these situations, there are often big messes with which to deal and the all-out housecleaning that follows a massive turnover at the top of the food chain can leave an organization vulnerable. Thank you Post by: Outside Solutions
I would like to say that and, with landscaping, the value usually increases with time and a little TLC. Post by: Landscape architects Maryland
A home lawn today requires a lot of maintenance; therefore you should undertake a landscaping project that best suits your budget and long-term goals since maintaining a lawn these days entails pouring in considerable amounts of money.Post by: landscape design Baltimore
Thank you for your shearing we can write our idea here. Post by: Pool decks Maryland
welcome to ( We are specialized in high quanlity jerseys we are wholesale NFL MLB NBA NHL Women Youth Jerseys $17 a pcs , free shipping any questions or needs are welcome ,we will endeavor to do best service for you. thanks in advance.
Type "339":
Top Articles
  1. Unblock MySpace
  2. MySpace
  3. FaceParty, the British MySpace
  4. and
  5. Blocking Facebook and MySpace
  1. Review of RSS Readers
  2. MySpace Layouts
  3. RSS Stock Ticker
  4. RSS Gets an Enema
  5. Google Reader rejects