skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
bxmaximum/bitrix-framework-skills204 installs

bitrix-seo

seo module — sitemap Generator/Job, RobotsFile, Yandex/Google webmaster engines, CSeoKeywords. Use when generating or regenerating sitemap.xml, editing robots.txt, wiring webmaster services, or asked for SEO redirects.

How do I install this agent skill?

npx skills add https://github.com/bxmaximum/bitrix-framework-skills --skill bitrix-seo
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The skill provides legitimate documentation and code examples for working with the Bitrix CMS SEO module. No security risks were identified.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

SEO module (seo)

Baseline: main 23.0+ · Verified: seo 26.100.0, main 26.800.0

Loader::includeModule('seo') before any class below. Page title/description of iblock content is not stored here: InheritedProperty in bitrix-iblocks (rules/query-seo-perf.md). Landing counters/meta: hooks in bitrix-landing.

Sitemap

ClassRole
Bitrix\Seo\Sitemap\Internals\SitemapTableb_seo_sitemap rows: SITE_ID, ACTIVE, NAME, DATE_RUN, serialized SETTINGS
Bitrix\Seo\Sitemap\JobBackground build by agent: markToRegenerate(), addJob(), doJobAgent(), STATUS_*
Bitrix\Seo\Sitemap\GeneratorOne step of a build: init($step, $state), run(), getStep(), getState()
Bitrix\Seo\Sitemap\Type\StepStep values: Step::STEPS[Step::STEP_INIT] = 0 … Step::STEPS[Step::STEP_INDEX] = 100

Settings saved from a form go through SitemapTable::prepareSettings($settings). Don't write your own XML writer.

Background (preferred): Job::markToRegenerate($sitemapId) creates the job and an agent (first run in 60 s, then every second) that runs one step per hit until done. Agents must run (cron in production, bitrix-background-jobs).

In-process (CLI, stepper): run() does one step of about 13 s and returns false only on error. The build is finished when getStep() reaches Step::STEPS[Step::STEP_INDEX]. Build a new Generator per step and carry step + state, as Job::doStep() does; across HTTP hits, persist both.

use Bitrix\Seo\Sitemap\Generator;
use Bitrix\Seo\Sitemap\Type\Step;

$step = Step::getFirstStep();
$state = [];
do {
    $generator = (new Generator($sitemapId))->init($step, $state);
    if (!$generator->run()) {
        throw new \RuntimeException($generator->getStatusMessage());
    }
    $step = $generator->getStep();
    $state = $generator->getState();
} while ($step < Step::STEPS[Step::STEP_INDEX]);

With SETTINGS['ROBOTS'] === 'Y' the last step adds the Sitemap: line to robots.txt itself.

Admin pages: /bitrix/admin/seo_sitemap.php, seo_sitemap_edit.php.

robots.txt

use Bitrix\Seo\RobotsFile;

$robots = new RobotsFile('s1'); // site document root robots.txt
$robots->addRule([RobotsFile::SITEMAP_RULE, 'https://example.com/sitemap.xml']);
$sitemaps = $robots->getRules(RobotsFile::SITEMAP_RULE);

RobotsFile extends Bitrix\Main\IO\File; SECTION_RULE = User-Agent. Admin: seo_robots.php.

Webmaster and search engines

  • Registry: Bitrix\Seo\SearchEngineTable (b_seo_search_engine, key CODE).
  • Engines in Bitrix\Seo\Engine\: Yandex (ENGINE_ID = 'yandex'), Google ('google'), YandexDirect, base YandexBase.
  • Bitrix\Seo\Webmaster\Service::getSites() — hosts with bound/verified flags.
  • Bitrix\Seo\Service::REDIRECT_URI (/bitrix/tools/seo_client.php) is the OAuth callback, not an HTTP redirect.
  • Legacy helpers (compat only): CSeoKeywords (Add/Update/GetByURL), CSeoPageChecker, CSeoUtils::getDomainsList(). Admin: seo_tools.php, seo_search_yandex.php, seo_search_google.php.
  • Ads/retargeting namespaces (Bitrix\Seo\Retargeting\, LeadAds\, Analytics\) are product integrations; skip them for sitemap/robots work.

Redirects: no API here

The kernel has no seo table for 301/302 rules. Don't invent SeoRedirectTable.

NeedWhere
Crawl allow/deny, sitemap URLRobotsFile, sitemap SETTINGS
Open-redirect allow-listsecurity module: CSecurityRedirect, Bitrix\Security\RedirectRuleTable
Page movedweb server rule, route (bitrix-routing) or LocalRedirect in a component

After URL changes: fix links in content, Job::markToRegenerate(), adjust robots.

Checklist

  • Loader::includeModule('seo') before Sitemap/Robots/Engine classes.
  • Sitemap rows via SitemapTable; builds via Job or a Generator step loop that carries step + state.
  • run() === false handled as an error, not as "more steps".
  • Iblock meta via InheritedProperty, not custom b_seo_* columns.
  • No invented redirect CRUD in seo.

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/bxmaximum/bitrix-framework-skills/bitrix-seo">View bitrix-seo on skillZs</a>