{"slug":"bitrix-seo","title":"bitrix-seo","summary":"Covers SEO module — sitemap generation, robots.txt, webmaster/search-engine engines, keywords/tools orientation; links to iblock IPROPERTY / InheritedProperty for page meta. Applied for crawl maps, Webmaster/Search Console wiring, SEO tooling. Key terms — Sitemap, Generator, Job,","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-08-28T17:01:59.45656Z","repo":{"url":"https://github.com/bxmaximum/bitrix-framework-skills","stars":32,"forks":5,"license":null,"updatedAt":"2026-08-25T17:45:16Z"},"bodyHtml":"<hr>\n<h2>name: bitrix-seo\ndescription: Covers SEO module — sitemap generation, robots.txt, webmaster/search-engine engines, keywords/tools orientation; links to iblock IPROPERTY / InheritedProperty for page meta. Applied for crawl maps, Webmaster/Search Console wiring, SEO tooling. Key terms — Sitemap, Generator, Job, RobotsFile, Webmaster, SearchEngine, InheritedProperty, IPROPERTY_TEMPLATES.</h2>\n<h1>SEO Module (<code>seo</code>)</h1>\n<p>Baseline: <strong>main 23.0+</strong>. Verified against kernel module <code>seo</code> in this repo.</p>\n<pre><code>\\Bitrix\\Main\\Loader::includeModule('seo');\n</code></pre>\n<p>The <code>seo</code> module covers <strong>sitemap generation</strong>, <strong>robots.txt helpers</strong>, <strong>search-engine / webmaster integrations</strong>, keyword tools, and ads/analytics connectors. It does <strong>not</strong> replace iblock SEO templates — page title/description for catalog/news live in <code>iblock</code> InheritedProperty (see below and skill <code>bitrix-iblocks</code>).</p>\n<h2>Sitemap</h2>\n<p>ORM config: <code>\\Bitrix\\Seo\\Sitemap\\Internals\\SitemapTable</code> → <code>b_seo_sitemap</code> (<code>SITE_ID</code>, <code>ACTIVE</code>, <code>NAME</code>, <code>DATE_RUN</code>, <code>SETTINGS</code>).</p>\n<p>Generation:</p>\n<table>\n<thead>\n<tr>\n<th>Class</th>\n<th>Role</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>\\Bitrix\\Seo\\Sitemap\\Generator</code></td>\n<td>Multistep build for one sitemap id (<code>run()</code>)</td>\n</tr>\n<tr>\n<td><code>\\Bitrix\\Seo\\Sitemap\\Job</code></td>\n<td>Job/agent orchestration (<code>addJob</code>, <code>markToRegenerate</code>, <code>doJobAgent</code>)</td>\n</tr>\n<tr>\n<td><code>\\Bitrix\\Seo\\Sitemap\\Type\\Step</code></td>\n<td>Step constants for the generator</td>\n</tr>\n<tr>\n<td><code>\\Bitrix\\Seo\\Sitemap\\Source\\Iblock</code></td>\n<td>Iblock URL source during generation</td>\n</tr>\n<tr>\n<td><code>\\Bitrix\\Seo\\Sitemap\\File\\*</code></td>\n<td>XML file writers</td>\n</tr>\n</tbody>\n</table>\n<pre><code>use Bitrix\\Seo\\Sitemap\\Internals\\SitemapTable;\nuse Bitrix\\Seo\\Sitemap\\Job;\nuse Bitrix\\Seo\\Sitemap\\Generator;\n\n$row = SitemapTable::getById($sitemapId)-&gt;fetch();\n// SETTINGS is serialized array (dirs, iblocks, file mask, …)\n// prepare via SitemapTable::prepareSettings($arSettings) when saving from forms\n\n// Queue background regeneration (agent-driven)\nJob::markToRegenerate($sitemapId);\n\n// Or drive steps in-process (admin/stepper style)\n$generator = new Generator($sitemapId);\n$done = $generator-&gt;run(); // false while more steps remain\n</code></pre>\n<p><code>Job::addJob($sitemapId)</code> registers a row; <code>Job::doJobAgent($sitemapId)</code> is the agent entry. Statuses: <code>Job::STATUS_REGISTER|PROCESS|FINISH|ERROR</code>.</p>\n<p>Admin UI: <code>/bitrix/admin/seo_sitemap.php</code>, <code>seo_sitemap_edit.php</code>. Prefer <code>Job</code>/<code>Generator</code> over reimplementing XML writers.</p>\n<h2>robots.txt</h2>\n<p><code>\\Bitrix\\Seo\\RobotsFile</code> extends <code>Bitrix\\Main\\IO\\File</code> for site document root <code>robots.txt</code>.</p>\n<pre><code>use Bitrix\\Seo\\RobotsFile;\n\n$robots = new RobotsFile($siteId); // SITE_ID like 's1'\n$robots-&gt;addRule(['Sitemap', 'https://example.com/sitemap.xml']);\n// SECTION_RULE = 'User-Agent', SITEMAP_RULE = 'Sitemap'\n</code></pre>\n<p>Useful when sitemap generation should register a Sitemap line. Admin: <code>seo_robots.php</code>.</p>\n<h2>Webmaster / Search Engines</h2>\n<p>Engine registry: <code>\\Bitrix\\Seo\\SearchEngineTable</code> (<code>b_seo_search_engine</code>, field <code>CODE</code>).</p>\n<p>Concrete engines under <code>\\Bitrix\\Seo\\Engine\\</code>:</p>\n<ul>\n<li><code>\\Bitrix\\Seo\\Engine\\Yandex</code> — Yandex Webmaster API (<code>ENGINE_ID = 'yandex'</code>)</li>\n<li><code>\\Bitrix\\Seo\\Engine\\Google</code> — Google Search Console oriented client</li>\n<li>Bases: <code>YandexBase</code>, shared <code>\\Bitrix\\Seo\\Engine</code> / <code>IEngine</code></li>\n</ul>\n<p>Webmaster service facade:</p>\n<pre><code>use Bitrix\\Seo\\Webmaster\\Service;\n\n// GROUP = 'webmaster', TYPE_GOOGLE = 'google'\n$sites = Service::getSites(); // host =&gt; binded/verified flags or error\n</code></pre>\n<p>OAuth / client callback uses <code>\\Bitrix\\Seo\\Service::REDIRECT_URI</code> (<code>/bitrix/tools/seo_client.php</code>) — <strong>OAuth redirect</strong>, not HTTP 301 SEO redirects.</p>\n<p>Domain helpers: <code>\\CSeoUtils::getDomainsList()</code>, <code>getDirStructure()</code> (autoloaded from <code>classes/general/seo_utils.php</code>).</p>\n<h2>Keywords and Page Tools</h2>\n<p>Legacy helpers (still in module):</p>\n<ul>\n<li><code>\\CSeoKeywords</code> — keywords by URL (<code>Add</code> / <code>Update</code> / <code>GetByURL</code>)</li>\n<li><code>\\CSeoPageChecker</code> — page SEO check used by admin tools</li>\n<li>Panel hooks: <code>CSeoEventHandlers</code> on <code>main</code> / <code>fileman</code></li>\n</ul>\n<p>Admin entry points: <code>seo_tools.php</code>, <code>seo_search_yandex.php</code>, <code>seo_search_google.php</code>.</p>\n<h2>“Redirects” Boundary (no invented API)</h2>\n<p>There is <strong>no</strong> <code>seo</code> DataManager for SEO HTTP 301/302 rules in this kernel.</p>\n<table>\n<thead>\n<tr>\n<th>Concern</th>\n<th>Where it lives</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Crawl allow/deny + sitemap URL</td>\n<td><code>RobotsFile</code>, sitemap <code>SETTINGS</code></td>\n</tr>\n<tr>\n<td>OAuth callback URL</td>\n<td><code>Bitrix\\Seo\\Service::REDIRECT_URI</code></td>\n</tr>\n<tr>\n<td>Open-redirect allowlist</td>\n<td><code>security</code> — <code>CSecurityRedirect</code>, <code>\\Bitrix\\Security\\RedirectRuleTable</code></td>\n</tr>\n<tr>\n<td>App/page redirects</td>\n<td>Routing / web server / <code>LocalRedirect</code> — not <code>seo</code></td>\n</tr>\n</tbody>\n</table>\n<p>Do not invent <code>SeoRedirectTable</code>. After URL changes: update content URLs, regenerate sitemap (<code>Job::markToRegenerate</code>), adjust robots if needed.</p>\n<h2>Iblock Meta (cross-ref <code>bitrix-iblocks</code>)</h2>\n<p>Catalog/section/element title, description, and related SEO strings are <strong>not</strong> stored in <code>seo</code> module tables. Use InheritedProperty:</p>\n<pre><code>\\Bitrix\\Main\\Loader::includeModule('iblock');\n\n// Resolved values for an element\n$values = (new \\Bitrix\\Iblock\\InheritedProperty\\ElementValues($iblockId, $elementId))\n    -&gt;getValues();\n// e.g. ELEMENT_META_TITLE, ELEMENT_META_DESCRIPTION, …\n\n// Templates (IPROPERTY_TEMPLATES) when saving element/section/iblock\n$templates = new \\Bitrix\\Iblock\\InheritedProperty\\ElementTemplates($iblockId, $elementId);\n$templates-&gt;set([\n    'ELEMENT_META_TITLE' =&gt; '{=this.Name}',\n    // …\n]);\n</code></pre>\n<p>Related: <code>SectionValues</code> / <code>SectionTemplates</code>, <code>IblockTemplates</code>, ORM <code>\\Bitrix\\Iblock\\InheritedPropertyTable</code>. Sitemap generation <strong>reads URLs</strong> from iblocks via <code>Sitemap\\Source\\Iblock</code>; meta tags still come from InheritedProperty / page components.</p>\n<p>Landing-page counters/meta use Landing hooks (<code>YaCounter</code>, <code>MetaMain</code>, …) — skill <code>bitrix-landing</code> — not <code>seo</code> Sitemap.</p>\n<h2>Analytics / Ads (orientation only)</h2>\n<p>Same module hosts retargeting/ads/analytics namespaces (<code>Bitrix\\Seo\\Analytics\\</code>, <code>Retargeting\\</code>, <code>LeadAds\\</code>, …). Use when wiring ad cabinets; not required for classic sitemap/robots tasks.</p>\n<h2>Checklist</h2>\n<ul>\n<li><input disabled=\"disabled\" type=\"checkbox\"> <code>Loader::includeModule('seo')</code> for Sitemap/Robots/Engine classes.</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Persist sitemap rows via <code>SitemapTable</code>; regenerate via <code>Job</code> / <code>Generator</code>.</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Register Sitemap in robots with <code>RobotsFile</code> when appropriate.</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Element/section meta via InheritedProperty — not custom columns in <code>b_seo_*</code>.</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Do not invent SEO redirect CRUD in <code>seo</code>; use server/routing or document the real module.</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Webmaster OAuth callback ≠ SEO URL redirect.</li>\n</ul>\n","files":[{"path":"SKILL.md","sizeBytes":6271,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-08-28T17:04:08.278972Z","sha256":"BFC614711783551662B4AE5AF8C1BB1BCFB8C07B752427B6C1468CC86D465ACB","sizeBytes":2893},"review":null,"source":{"repositoryUrl":"https://github.com/bxmaximum/bitrix-framework-skills","path":"skills/bitrix-seo","license":null,"commit":"66c40e0ac8bdb3a3b68c3e53745b006659341594","subtreeSha":"86D263860E63B22A94CE1B749B3B6E5E8EC8F05914742CEB8C707B4710740E62","lastSyncedAt":"2026-09-27T19:34:22.479278Z"},"reviewedAt":"2026-08-28T17:08:01.939216Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/bxmaximum/bitrix-framework-skills/tree/main/skills/bitrix-seo"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install bxmaximum-bitrix-framework-skills@llmmart"},{"target":"git","command":"git clone https://github.com/bxmaximum/bitrix-framework-skills.git"}]}