Marking up your RSS feed

Follow our tips on properly marking up your RSS feed so that your content is displayed correctly in the Yandex Zen feed.
  1. General recommendations
  2. Source description
  3. Content description
  4. Media description
  5. Removing HTML code
  6. Example of an RSS feed utilizing all of its elements

General recommendations

Technical specifications

  • The RSS feed must meet the basic requirements for the content markup and freshness.
  • Send all links to images and videos posted in your publication. Stories must contain at least one image no less than 400 pixels wide. Place your image using these elements: img, media:content or enclosure. If you're using img or media:content, specify the same image information in enclosure.
  • Make sure your publication's URLs don't contain GET parameters.
  • Grant the Yandex robot access to your content and it will be displayed in the RSS feed. Make sure the RSS address in the robots.txt text file isn't restricted by the Disallow command, or you manually open the access by using the Allow RSS_URL command.

    Example:

    # If robots.txt includes the Disallow /feed # command, then the robot won't index the page your-site.ru/feed/some_url/rss.xml 
    # To enable indexing, add the Allow /feed/some_url/rss.xml command.
  • Your feed should include content posted within the last two to three days. Having too many content blocks makes processing the RSS feed more difficult. Older content is stored in the Yandex Zen database.
  • Delete HTML code not included in the up-to-date RSS recommendations.

After you mark up your RSS feed, make sure to validate it. If your feed includes empty or unclosed elements, Zen won't be able to process it.

The elements listed below may sometimes be deemed incorrect by the validator. The reason being that the validator doesn't always properly take Zen structure into account. This can be ignored. Just make sure you've dealt with all empty and unclosed elements.

Content requirements

All stories in the RSS feed must comply with the Yandex Zen requirements. We also ask publishers to mark up their content with special elements. For technical details, go to Content description.

  • Specify the subject of your content using the category element so that Yandex Zen can find an interested audience faster.
  • Mark up explicit content with media:rating. Only subscribers will be able to see such content. If your website mostly deals with explicit content, it will receive the “Adult” status.
  • For content that is always relevant, specify evergreen in the category element. This will promote your content in other users' feed and attract more positive reactions from your audience. There's no need to mark up quickly outdated content or news by relevance.
    Which stories remain relevant, and which ones quickly become outdated?

    Stories that are interesting to users for a long time regardless of their publication date are always relevant. These include stories about culture, science, or history, useful tips and interesting facts, travel reports, or large analytical articles.

    Stories that clearly refer to specific dates quickly become outdated. These include news and reports on sports or social events.

Source description

Element Description
rss Data format. All data is imported into Zen using the XML-basedRSS 2.0 format. RSS, Media RSS, GeoRSS, HTML5, and microformats are supported.
channel

Elements that include data about the source website.

<channel>     
    <title>Android to Restore a Farm in Japan</title>
    <link>http://example.com/happy-farmer</link>
    <description>
        Abandoned land has been given to an android 
        that looks like a famous Japanese economist.
    </description>
    <language>ru</language>
    <item>
        …
    </item>
</channel>
title

Website name.

link

Website URL.

description

Website description.

language

The RSS feed language uses the ISO 639-1 standard. This is an optional element.

item

Elements that describe content. Your feed can contain multiple instances of item elements. Your feed should include content posted within the last two to three days. Having too many content blocks makes processing the RSS feed more difficult.

Usage example
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:media="http://search.yahoo.com/mrss/"
    xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns:georss="http://www.georss.org/georss">
    <channel>
        <title>Parsnip</title>
        <link>http://example.com/</link>
        <description>
            Project about fruit and vegetables. Grow, cook, and eat them the right way.
        </description>
        <language>ru</language>
        <item>
         ...
        </item>
    </channel>
</rss>

Content description

The set of elements that describe content is contained inside the item element. Mandatory elements are marked by the icon.

Element Description
title Headline
link

The URL of an article currently broadcast in the RSS feed. The RSS link must be an exact copy of your website link, down to the last symbol. These URLs do not match:

  • http://example.com/2023/07/04/android-happy-farmer
  • http://example.com/2023/07/04/android-happy-farmer/
  • http://example.com/2023/07/04/android-happy-farmer?utm_medium=cpc&utm_source=yandex. {source_type}&utm_campaign={campaign_id}&utm_content={ad_id}&utm_term={keyword}
pdalink Link to the mobile version.
amplink Link to the AMP version.
guid

Unique ID of the article.

If you want to resubmit an article to the RSS feed, specify its original guid and URLto avoid duplicates.

media:rating

Age rating The description for this element should only utilize values listed below. Any other value will result in a feed error.

  • adult — adult-only content
  • nonadult — content that can be displayed to anyone over the age of 13
pubDate Publication date and time in the RFC822 format: Wed, 02 Oct 2002 15:00:00 +0300. If left unspecified, the RSS feed upload date is considered the content publication date by default.
author Author name
category

Topic

You can pick multiple topics from the list below
  • Auto
  • War
  • Design
  • Home
  • Food
  • Health
  • Celebrities
  • Gaming
  • Cinema
  • Culture
  • Literature
  • Fashion
  • Music
  • Science
  • Society
  • Politics
  • Nature
  • Happenings
  • Psychology
  • Travel
  • Sports
  • Technology
  • Photography
  • Hobbies
  • Economy
  • Humor

Relevance. If a story pertains to content that is always relevant, use evergreen in the element description.

enclosure

Descriptions of images, audio, and videos included in your publication. You can mention included media once or use the figure, media:content elements located inside content:encoded.

Each figure or media:content element must have a matching enclosure element in the description. For instance, if your content includes two images and one videos, place three enclosure elements in the source description.

If your publication contains several size versions of the same image, specify the enclosure element once and place the URL of your largest image inside. The minimum image width is 300 pixels. Make sure your image doesn't contain any captions or numbers, as they might get cropped during uploading.

description Short description.
content:encoded Full text (at least 300 characters including spaces recommended) or a video. Contains elements required for embedding media.
Usage example
<item>
<title>Android to Restore a Farm in Japan</title>
<link>http://example.com/2023/07/04/android-happy-farmer</link>
<pdalink>http://m.example.com/2023/07/04/android-happy-farmer</pdalink>
<amplink>http://amp.example.com/2023/07/04/android-happy-farmer</amplink>
<media:rating scheme="urn:simple">nonadult</media:rating>
<pubDate>Tue, 4 Jul 2023 04:20:00 +0300</pubDate>
<author>Petr Strugatskiy</author>
<category>Technology</category>
<category>Science</category>
<category>Design</category>
<category>evergreen</category>
<enclosure url="http://example.com/2023/07/04/pic1.jpg" type="image/jpeg"/>
<enclosure url="http://example.com/2023/07/04/pic2.jpg" type="image/jpeg"/>
<enclosure url="http://example.com/2023/07/04/video/42420" type="video/x-ms-asf"/>
 <description>
  <![CDATA[
  Abandoned land has been given to an android 
  that looks like a famous Japanese economist.
  ]]>
 </description>
 <content:encoded>
  <![CDATA[
   <p>Here is the full text of the article.</p>
  ]]>
 </content:encoded>
</item>

Media description

Elements describing media content are located inside the content:encoded element. You don't have to use elements from this table.

Element Description
figure
Image description:
<figure>     
   <img src="http://example.com/pic1.jpg" width="1200" height="900">
   <figcaption>
      The first android farmer looks at its land
   </figcaption>  
</figure>
Video description:
<figure>     
   <video width="1200" height="900">
      <source src="http://example.com/42420" type="video/mp4">
   </video>
   <figcaption>
      Android farmer plows the land using its own invention
      <span class="copyright">Mikhail Rodchenkov</span>
   </figcaption>
 </figure>
img An image in JPEG, GIF, or PNG at least 300 pixels wide. The first image marked up with this element will be posted on the Zen feed card. Repost each image marked with img in the content description using the enclosure element.
video

Video Acceptable formats:

  • MPEG-4 (H. 264)
  • YouTube
  • Vimeo.
Repost each video marked with video in the content description using the enclosure element.
figcaption Caption under image or video
<figcaption>
    The first android farmer looks at its land
    <span class="copyright">Mikhail Rodchenkov</span>
</figcaption>
media:content
An alternative to using figure to embed media into your publication:
  • JPEG, GIF, and PNG images
  • MPEG-4 (H. 264), YouTube or Vimeo videos
  • MPEG-3 and SoundCloud audio files

Repost each image, video or audio file marked with media:content in the content description using the enclosure element.

Elements used to describe images, videos, or audio files:

<media:content>     
    <media:description/>
    <media:copyright/>
</media:content>
media:description Caption under image or video
media:copyright Copyright for images and videos.
Example of using the <img>, <video>, <figcaption> elements:
<figure>
    <img src="http://example.com/2023/07/04/pic1.jpg" width="1200" height="900">
      <figcaption>
         The first android farmer looks at its land <span class="copyright">Mikhail Rodchenkov</span>
      </figcaption>
</figure>
<figure>
    <video width="1200" height="900">
      <source src="http://example.com/2023/07/04/video/42420" type="video/mp4">
    </video>
    <figcaption>
      Android farmer plows the land using its own invention
     <span class="copyright">Mikhail Rodchenkov</span>
    </figcaption>
</figure>
Example of using the <media:content>, <media:description>, and <media:copyright> elements
<item>
    <media:content type="image/jpeg" medium="image" width="900" height="300"
url="http://example.com/2023/07/04/pic1.jpg">
        <media:description type="plain">
            Android farmer looks at its land </media:description>
        <media:copyright>Mikhail Rodchenkov</media:copyright>
    </media:content>
</item>

Removing HTML code

Delete all HTML code not included in the up-to-date recommendations, such as:

Video
<iframe src="URL Vimeo или YouTube" height="480" width="640"/>
Instagram, Twitter, Facebook
<iframe src="//instagram.com/p/INSTID/" ...></iframe>
<blockquote class="twitter-tweet" ...>
    <h3>Status text</h3>
    <a href="https://t.co/...">media reference</a>
</blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8">
</script>
<div class="fb-post" data-href="facebook_url_to_the_post"> ... </div>
<div class="fb-video" data-href="facebook_url_to_video"> ... </div>
Note. The p and span elements located inside content:encoded are removed automatically by Yandex Zen.

Example of an RSS feed utilizing all of its elements

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:media="http://search.yahoo.com/mrss/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:georss="http://www.georss.org/georss">
<channel>
<title>Parsnip</title>
<link>http://example.com/</link>
<description>
Project about fruit and vegetables. Grow, cook, and eat them the right way.
</description>
<language>ru</language>
<item>
 <title>Android to Restore a Farm in Japan</title>
 <link>http://example.com/2023/07/04/android-happy-farmer</link>
 <pdalink>http://m.example.com/2023/07/04/android-happy-farmer</pdalink>
 <amplink>http://amp.example.com/2023/07/04/android-happy-farmer</amplink>
 <guid>2fd4e1c67a2d28fced849ee1bb76e7391b93eb12</guid>
 <pubDate>Tue, 4 Jul 2023 04:20:00 +0300</pubDate>
 <media:rating scheme="urn:simple">nonadult</media:rating>
 <author>Petr Strugatskiy</author>
 <category>Technology</category>
 <category>evergreen</category>
 <enclosure url="http://example.com/2023/07/04/pic1.jpg" type="image/jpeg"/>
 <enclosure url="http://example.com/2023/07/04/pic2.jpg" type="image/jpeg"/>
 <enclosure url="http://example.com/2023/07/04/video/420"
 type="video/x-ms-asf"/>
  <description>
   <![CDATA[
   Abandoned land has been given to an android 
   that looks like a famous Japanese economist.]]>
  </description>
  <content:encoded>
   <![CDATA[
   <p>Here is the full text of the article.
   It can be interrupted by pictures, videos, and other media content.</p>
   <figure>
   <img src="http://example.com/2023/07/04/pic1.jpg" width="1200" height="900">
   <figcaption>
   The first android farmer looks at its land
   <span class="copyright">Mikhail Rodchenkov</span>
   </figcaption>
   </figure>
   <p>The article continues after the image. The article describes
   the plowing technology is used by a Japanese android farmer.
   So you'll need to have a videoclip for this type of material. See an example of the video is below.</p>
   <figure>
   <video width="1200" height="900">
   <source src="http://example.com/2023/07/04/video/42420" type="video/mp4">
   </video>
   <figcaption>
   Android farmer plows the land using its own invention
   <span class="copyright">Mikhail Rodchenkov</span>
   </figcaption>
   </figure>
   <p>The article continues after the video. Android digs up potatoes.
   Farms are thriving.</p>]]>
  </content:encoded>
</item>
</channel>
</rss>

Download an example of RSS feed markup.