Marking up your RSS feed
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 300 pixels in width. Place your image using these elements:
img
,media:content
orenclosure
. If you're usingimg
ormedia:content
, specify the same image information inenclosure
. - 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 theAllow 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. |
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 |
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. |
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 |
<?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:
|
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.
|
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 |
enclosure ![]() | Descriptions of images, audio, and videos included in your publication. You can mention included media once or use the Each If your publication contains several size versions of the same image, specify the |
description | Short description. |
content:encoded ![]() | Full text (at least 300 characters including spaces recommended) or a video. Contains elements required for embedding media. |
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:
|
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.
|
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 |
enclosure ![]() | Descriptions of images, audio, and videos included in your publication. You can mention included media once or use the Each If your publication contains several size versions of the same image, specify the |
description | Short description. |
content:encoded ![]() | Full text (at least 300 characters including spaces recommended) or a video. Contains elements required for embedding media. |
<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:
Video description:
|
img | JPEG, GIF, or PNG image, 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:
video in the content description using the enclosure element. |
figcaption | Caption under image or video |
media:content | An alternative to using figure to embed media into your publication:
Repost each image, video or audio file marked with Elements used to describe images, videos, or audio files: |
media:description | Caption under image or video |
media:copyright | Copyright for images and videos. |
Element | Description |
---|---|
figure | Image description:
Video description:
|
img | JPEG, GIF, or PNG image, 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:
video in the content description using the enclosure element. |
figcaption | Caption under image or video |
media:content | An alternative to using figure to embed media into your publication:
Repost each image, video or audio file marked with Elements used to describe images, videos, or audio files: |
media:description | Caption under image or video |
media:copyright | Copyright for images and videos. |
<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>
<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 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>
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>