Implementing Yandex Turbo Pages
Yandex Turbo is the Russian equivalent of Google AMP. Turbo pages are generated from a special RSS feed format and displayed directly in Yandex search on mobile devices. They load significantly faster than original pages thanks to caching on Yandex servers.
Turbo RSS Format
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:turbo="http://turbo.yandex.ru" version="2.0">
<channel>
<title>Website Name</title>
<link>https://example.com</link>
<description>Website Description</description>
<item turbo="true">
<title>Article Title</title>
<link>https://example.com/articles/slug</link>
<pubDate>Mon, 28 Mar 2025 12:00:00 +0300</pubDate>
<author>Author Name</author>
<turbo:topic>Development</turbo:topic>
<turbo:content>
<![CDATA[
<header>
<h1>Article Title</h1>
<figure>
<img src="https://example.com/img/cover.jpg" alt="Cover"/>
</figure>
</header>
<p>Article introduction...</p>
<p>Main text with <strong>emphasized</strong> words and
<a href="https://example.com/other-article">links</a>.</p>
<figure>
<img src="https://example.com/img/photo.jpg" alt="Photo"/>
<figcaption>Photo caption</figcaption>
</figure>
]]>
</turbo:content>
</item>
</channel>
</rss>
RSS Generation in Laravel
// TurboFeedController
class TurboFeedController extends Controller
{
public function __invoke(): Response
{
$articles = Article::published()
->with(['author', 'category', 'tags'])
->latest('published_at')
->limit(500) // Yandex processes up to 500 items
->get();
$xml = $this->buildFeed($articles);
return response($xml, 200, [
'Content-Type' => 'application/rss+xml; charset=utf-8',
]);
}
private function buildFeed(Collection $articles): string
{
$dom = new \DOMDocument('1.0', 'UTF-8');
$dom->formatOutput = true;
$rss = $dom->createElement('rss');
$rss->setAttribute('version', '2.0');
$rss->setAttribute('xmlns:turbo', 'http://turbo.yandex.ru');
$dom->appendChild($rss);
$channel = $dom->createElement('channel');
$rss->appendChild($channel);
$this->addElement($dom, $channel, 'title', config('app.name'));
$this->addElement($dom, $channel, 'link', config('app.url'));
$this->addElement($dom, $channel, 'description', 'Articles and materials');
foreach ($articles as $article) {
$item = $dom->createElement('item');
$item->setAttribute('turbo', 'true');
$channel->appendChild($item);
$this->addElement($dom, $item, 'title', $article->title);
$this->addElement($dom, $item, 'link', route('articles.show', $article));
$this->addElement($dom, $item, 'pubDate', $article->published_at->toRfc2822String());
$this->addElement($dom, $item, 'author', $article->author->name);
$this->addElement($dom, $item, 'turbo:topic', $article->category->name, 'http://turbo.yandex.ru');
$content = $dom->createElement('turbo:content');
$content->setAttribute('xmlns:turbo', 'http://turbo.yandex.ru');
$cdata = $dom->createCDATASection($this->prepareContent($article));
$content->appendChild($cdata);
$item->appendChild($content);
}
return $dom->saveXML();
}
private function prepareContent(Article $article): string
{
$content = $article->content;
// Remove scripts and unwanted tags
$content = preg_replace('/<script\b[^>]*>.*?<\/script>/is', '', $content);
$content = preg_replace('/<iframe\b[^>]*>.*?<\/iframe>/is', '', $content);
$content = preg_replace('/\s*class\s*=\s*["\'][^"\']*["\']/i', '', $content);
return "<header><h1>{$article->title}</h1></header>{$content}";
}
private function addElement(\DOMDocument $dom, \DOMNode $parent, string $tag, string $value, ?string $ns = null): void
{
$el = $ns ? $dom->createElementNS($ns, $tag) : $dom->createElement($tag);
$el->appendChild($dom->createTextNode($value));
$parent->appendChild($el);
}
}
Route and Caching
// routes/web.php
Route::get('/turbo-feed.xml', TurboFeedController::class)->name('turbo.feed');
// With 30-minute caching
public function __invoke(): Response
{
$xml = Cache::remember('turbo_feed', 1800, fn() => $this->buildFeed(/* ... */));
return response($xml, 200, ['Content-Type' => 'application/rss+xml; charset=utf-8']);
}
Connecting in Yandex Webmaster
- Add site to Yandex Webmaster
- Go to "Content" → "Turbo Pages"
- Enter RSS feed URL:
https://example.com/turbo-feed.xml - Wait for indexing (1–3 days)
Turbo Pages Analytics
Yandex.Metrica automatically tracks Turbo traffic as a separate segment. Yandex Webmaster provides view statistics and parsing errors.
Timeframe
Turbo RSS feed generation with caching and Yandex Webmaster integration: 1–2 business days.







