Yandex Turbo pages implementation for website

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

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

  1. Add site to Yandex Webmaster
  2. Go to "Content" → "Turbo Pages"
  3. Enter RSS feed URL: https://example.com/turbo-feed.xml
  4. 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.