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

  • The RSS feed should comply with our requirements.
  • Send all links to images and videos posted in your publication. Publications should contain at least one image of no less than 400 pixels in width. 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.
  • 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.
  • Specify your content's subject matter, and Zen will quickly find an appropriate target audience.
  • 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 with the Disallow command, or you can manually open the access by using the Allow RSS_URL command.

    Example:

    # If in robots.txt includes the command 
    Disallow /feed
    # then the robot won't index the page
    your-site.ru/feed/some_url/rss.xml
    # To enable indexing, add the command
    Allow /feed/some_url/rss.xml 
  • 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.

Source description

Mandatory elements are marked by the icon.

Element Description
rss Data format. All data is imported into Zen using the XML-based RSS 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 farm in Japan</title>
    <link>http://example.com/happy-farmer</link>
    <description>
        Abandoned land given to Android
       that looks like a famous Japanese economist.
    </description>
    <language>EN</language>
    <item>
        …
    </item>
</channel>
title

Website name.

link

Website URL.

description

Website description.

language

The RSS feed language uses the ISO 639-1 standard.

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.

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>Pasternak</title>
        <link>http://example.com/</link>
        <description>
            A project about fruit and vegetables. Here you will learn how to
            properly grow, cook, and eat them.
        </description>
        <language>ru</language>
        <item>
    ...
    </item>
    </channel>

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.
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
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 400 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.
Example
<item>
    <title>Android to restore 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>Pyotr Strugatsky</author>
    <category>Technology</category>
    <category>Science</category>
    <category>Design</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 near the University of Tokyo given the Android
        that looks like a famous Japanese economist.
        ]]>
    </description>
    <content:encoded>
        <![CDATA[
        <p>Full article text here.</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 observes his land
   </figcaption>  
 </figure>
Video description:
<figure>     
   <video width="1200" height="900">
      <source src="http://example.com/42420" type="video/mp4">
   </video>
   <figcaption>
      Android farmer plowing the land the tool they invented
      <span class="copyright">Mikhail Rodchenkov</span>
   </figcaption>
 </figure>
img JPEG, GIF, or PNG image, at least 400 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 observes his 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 observes their 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 plowing the land with a tool they invented
     <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="400" url="http://example.com/2023/07/04/pic1.jpg">
        <media:description type="plain">
            Android farmer observes their 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:

Videos
<iframe src="URL Vimeo or 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>Pasternak</title>
        <link>http://example.com/</link>
        <description>
A project about fruit and vegetables. Learn how to properly grow, cook, and eat fruit and vegetables.
</description>
        <language>EN</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>Peter Strugatsky</author>
           <category>Technologies</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 near the University of Tokyo given to Android
        that looks like a famous Japanese economist.
        ]]>
    </description>
    <content:encoded>
        <![CDATA[

<p>Full article text here.
It may be interrupted by images, video, or other media content.</p>
<figure>
    <img src="http://example.com/2023/07/04/pic1.jpg" width="1200" height="900">
        <figcaption>
The first Android farmer observes their land

            <span class="copyright">Mikhail Rodchenkov</span>
        </figcaption>
    </figure>
    <p>The article then goes on after the embedded image. The article describes
a plowing technique used by a Japanese android farmer.
So you'll need to have a videoclip for this type of material. Example for video 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 plowing the land with the tool they invented

                <span class="copyright">Michael Rodchenkov</span>
            </figcaption>
        </figure>
        <p>The article goes on after the embedded video. Android digs up potatoes.
Farms are thriving. Japan never fails to amaze.</p>
]]>
            </content:encoded>
        </item>
    </channel>
</rss>

Download RSS feed markup example.