Setting Up RSS Feed for Yandex Turbo and Dzen
RSS feed is a single entry point for aggregators: Yandex.Dzen, Yandex Turbo, Google News, Telegram bots. Each platform requires correct format and attributes.
Universal RSS Feed
// RssFeedController
class RssFeedController extends Controller
{
public function articles(): Response
{
$articles = Article::published()
->with(['author', 'category'])
->latest('published_at')
->limit(100)
->get();
$content = view('feeds.articles-rss', compact('articles'))->render();
return response($content, 200, [
'Content-Type' => 'application/rss+xml; charset=utf-8',
'Cache-Control' => 'public, max-age=1800',
]);
}
}
{{-- resources/views/feeds/articles-rss.blade.php --}}
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:media="http://search.yahoo.com/mrss/"
xmlns:turbo="http://turbo.yandex.ru">
<channel>
<title>{{ config('app.name') }}</title>
<link>{{ config('app.url') }}</link>
<description>Articles on development</description>
<language>en</language>
<lastBuildDate>{{ now()->toRfc2822String() }}</lastBuildDate>
<image>
<url>{{ asset('img/logo-rss.png') }}</url>
<title>{{ config('app.name') }}</title>
<link>{{ config('app.url') }}</link>
</image>
@foreach($articles as $article)
<item turbo="true">
<title>{{ htmlspecialchars($article->title) }}</title>
<link>{{ route('articles.show', $article) }}</link>
<guid isPermaLink="true">{{ route('articles.show', $article) }}</guid>
<pubDate>{{ $article->published_at->toRfc2822String() }}</pubDate>
<author>{{ $article->author->email }} ({{ $article->author->name }})</author>
<category>{{ $article->category->name }}</category>
<description><![CDATA[{{ $article->excerpt }}]]></description>
{{-- Full text for Dzen and Turbo --}}
<content:encoded><![CDATA[
@if($article->cover_url)
<figure>
<img src="{{ $article->cover_url }}" alt="{{ $article->title }}"/>
</figure>
@endif
{!! $article->content !!}
]]></content:encoded>
{{-- Media RSS for cover --}}
@if($article->cover_url)
<media:content url="{{ $article->cover_url }}" medium="image" type="image/jpeg">
<media:title>{{ $article->title }}</media:title>
</media:content>
@endif
{{-- Turbo content --}}
<turbo:content><![CDATA[
<header><h1>{{ $article->title }}</h1></header>
{!! $article->content !!}
]]></turbo:content>
</item>
@endforeach
</channel>
</rss>
Connecting to Yandex.Dzen
Yandex.Dzen accepts content via RSS:
- Go to dzen.ru → Create channel
- In channel settings select "Auto import via RSS"
- Enter URL:
https://example.com/feed/articles.xml - Validate with Dzen's built-in validator
Dzen RSS requirements:
- At least 10 articles for validation
- Full text in
<content:encoded>, not just excerpt - Images must be accessible (not 403)
- Minimum 1 publication per week for active status
<turbo> Attribute and Multiple Feeds
You can maintain one feed with turbo="true" attribute for both services, or split:
Route::get('/feed.xml', [RssFeedController::class, 'articles']); // Main
Route::get('/turbo-feed.xml', [RssFeedController::class, 'turbo']); // Turbo only
Route::get('/dzen-feed.xml', [RssFeedController::class, 'dzen']); // For Dzen with special rules
Auto-Update and Notifying Aggregators
// When publishing article — ping aggregators
public function handle(ArticlePublished $event): void
{
$feedUrl = urlencode(route('feed.articles'));
// Yandex ping
Http::get("https://blogs.yandex.ru/pings/?status=success&url={$feedUrl}");
// Google
Http::get("https://pubsubhubbub.appspot.com/?hub.mode=publish&hub.url={$feedUrl}");
}
Timeframe
Setting up RSS with Turbo and Dzen support, pinging aggregators: 1 business day.







