How To Generate a Feed link Element


How To Generate a Feed link Element? - RSS FAQs - Atom Feed File Structure and Elements



The <link> element is not a required sub-element of the <feed> element. But it is strongly recommended that you provide a link element with rel="self" for each of your feed documents.

The rule for feed link element is simple. It needs two attributes:

  • rel="self" - Indicating that this link is providing the URL of this feed document itself.
  • href="/urlOfThisFeed" - Specifying the URL of this feed document.

For example, if you have a feed document located at, you should generate a feed link element like this:

 <link rel="self" href=""/>

2007-05-12, 4600👍, 0💬