indexgap doctor

command

The crawl-to-index funnel.

Follows the pages from what was generated, through the sitemap, to what each search engine has actually indexed — and reports where they were lost, section by section: the URL section that loses noticeably more than the rest of the site is highlighted, because the cause there is usually one template, one set of links or one sitemap. Given a Bing Webmaster Tools AI Performance export, it adds the step after the index: which pages Microsoft Copilot actually cites, which of them you have closed from search, and which you left out of the sitemap. --logs reads the server's access log and shows which pages AI search bots and assistants acting on a person's request actually fetched — separately from training crawlers — and which sections they skip; --verify-bots drops spoofed bots by their published address ranges; --probe-bots opens the home page as a browser and as every bot with a documented User-Agent and compares the responses, to catch a CDN refusing them (bot-blocked-cdn) — a hint only, since CDNs recognise real bots by IP and the logs stay the evidence; --probe-robots reads the live robots.txt, says whether the site is behind Cloudflare (server: cloudflare, cf-ray), shows what differs from the build's robots.txt — the block Cloudflare's managed robots.txt puts in front of the file, Content-Signal lines — and checks those signals; when training is opted out behind Cloudflare it warns that Cloudflare's Training action also applies to mixed-purpose crawlers (search plus training) and says where to check. For Cloudflare, --logs reads Logpush JSON lines of the http_requests dataset: export ClientIP, ClientRequestHost, ClientRequestMethod, ClientRequestURI, ClientRequestUserAgent, ClientRequestReferer, EdgeResponseStatus and EdgeStartTimestamp (any timestamp format: unixnano, unix, rfc3339, rfc3339ms, rfc3339ns). Creating the job needs an API token scoped to the zone with Logs: Write — a user token (cfut_...) or an account token (cfat_...), not the Global API Key; Service Keys stopped working on 30 September 2026. IndexGap itself never calls the Cloudflare API and needs no token: it reads the files the job delivers; --cite adds a cite measurement; --baseline says what dropped out and which sections became gaps since the last run; --history keeps every run and draws the funnel over time. When the detected stack draws text with JavaScript, it prints which crawlers render JavaScript and which see only the source HTML. With "markets" in indexgap.json ("RU", "KZ", ...) it adds a non-Google layer: which consoles those markets need and whether the run has their exports, with market-engine-missing for each missing one. It also lists the site's page languages and, for each, whether Google's AI Overviews and AI Mode are confirmed in that language (indexgap/data/google_ai.json, copied from Google's help pages with a date), with google-ai-language-unconfirmed as info where neither is. Logs recognise Baiduspider (verified by reverse DNS, *.baidu.com or *.baidu.jp) next to Googlebot, bingbot and YandexBot. On Vercel, a firewall rule for AI bots belongs in log mode, not deny: deny also turns away OAI-SearchBot, ChatGPT-User and Claude-SearchBot, which fetch the pages AI answers cite; and Vercel's bot protection does not work behind Cloudflare, where Cloudflare's own bot settings decide (it blocks AI bots by default). A bot that gets 403 in the logs is usually such a rule, not robots.txt. --market CN adds readiness checks for mainland China and Baidu, and --send with it pushes the Chinese pages to Baidu's link push API.

Mainland China and Baidu: --market CN

indexgap doctor ./public --site https://example.com --market CN runs readiness checks for a Chinese version of the site. They tell you what keeps Baidu and a reader in mainland China from reaching a page; they do not promise a position in Baidu, and nothing in them predicts traffic.

The market can also come from indexgap.json: "markets": ["CN"]. A site with no zh-* pages gets the site-level checks and a plain note that there are no Chinese pages to check.

Sending pages to Baidu

Baidu does not take part in IndexNow, so indexgap indexnow push never reaches it. doctor --market CN prints how many Chinese pages would go to Baidu's link push API; --send sends them (plain text, one URL per line, up to 2,000 per request) with the key from BAIDU_PUSH_TOKEN. The push is free; Baidu returns the site's remaining daily quota, and the run stops when it reaches zero. Pages closed to Baiduspider in robots.txt are not sent.

Check the demand first

--market CN starts with a question the package cannot answer for you: do people in China actually look for what the site offers, in Chinese? A topic that is big in English can have little Chinese demand, or demand that a local service already meets. Look at Baidu Index, Baidu's own suggestions and your own query data before translating anything.

AI browsers: what can and can't be measured

Agentic browsers that run on the person's own computer — Comet, Opera Neon, Dia, Edge with Copilot, Chrome with Gemini, Brave with Leo, Genspark, Fellou, Sigma — send that browser's ordinary User-Agent and do not sign their requests. In a log their visits look like a person's, and doctor --logs says so rather than guessing. It reports a separate AI browser agents group, apart from crawlers and from people, for what does identify itself: the Google-Agent and Claude-Agent tokens of cloud browsers and Web Bot Auth requests by their Signature-Agent header (an unknown signer is listed under its host). That header is in the log only when request headers are logged — Caddy request.headers, Cloudflare Logpush custom fields (RequestHeaders), an nginx JSON format with $http_signature_agent. The signature is not verified; the CDN does that. A crawler that signs (OAI-SearchBot with a signature) stays a crawler.

Mainstream browsers now ship an assistant too — Firefox (a sidebar chatbot that is the provider's own site, Link Previews, Smart Window searching through Exa), Yandex Browser with Alice AI (summaries and page questions; Alice AI answers come from Yandex's index, and a YandexAdditional disallow keeps a page out of them), Safari with Apple Intelligence (Reader summaries; Applebot and Applebot-Extended), Opera One and GX with Opera AI, the DuckDuckGo browser with Duck.ai (DuckAssistBot, traditional links largely from Bing) and Kagi Orion. They answer about the page already open or search for the person, so they add no visits of their own to a log and are not listed as indistinguishable agents. Samsung Internet's Browsing Assist answers through Perplexity's APIs; Samsung calls it agentic, and what it does runs in the person's browser with its ordinary User-Agent. Vivaldi decided against an AI surface. Clicks from Duck.ai arrive with the duck.ai referrer (analytics guides, not DuckDuckGo) and count as AI visits.

None of these browsers offers a public answer API. The index behind each one does: Sonar for Perplexity (Comet, Samsung Browsing Assist), the Gemini API for Google, the Alice AI model through Yandex AI Studio (cite --provider yandex), and the Brave Answers API (cite --provider brave-answers, key BRAVE_ANSWERS_API_KEY) for Brave. Those measure the index, not the browser assistant. The assistants' own answers are collected by hand into the comet, neon, dia, leo, genspark, fellou, aria, duckai and kagi folders (Alice AI in Yandex Browser into alice). ChatGPT Atlas closed on 2026-08-09 and is not supported. Data as of 2026-12-05, from indexgap/data/ai_browsers.json (sources per entry; entries without a vendor document are marked unconfirmed there).

BrowserVendorIndex (crawlers) APIDetectable in logs
ChatGPT agent (cloud browser)OpenAIbingnoSignature-Agent chatgpt.com
Google-Agent (Google-hosted agents)GooglegooglenoUser-Agent token google-agent; Signature-Agent agent.bot.goog
Claude-Agent (Anthropic-hosted browsers)AnthropicbravenoUser-Agent token claude-agent
Perplexity CometPerplexityperplexitycite --provider perplexityindistinguishable from an ordinary browser
Chrome with Gemini (auto browse)Googlegooglecite --provider geminiindistinguishable from an ordinary browser
Microsoft Edge with CopilotMicrosoftbingnoreferrer edgeservices.bing.com
Brave with LeoBravebravecite --provider brave-answersindistinguishable from an ordinary browser
Opera NeonOperanot statednoindistinguishable from an ordinary browser
DiaThe Browser Company (Atlassian)not statednoindistinguishable from an ordinary browser
Genspark AI BrowserGensparknot statednoreferrer genspark.ai
FellouFellounot statednoindistinguishable from an ordinary browser
Sigma AI BrowserSigmanot statednoindistinguishable from an ordinary browser
Claude in Chrome (extension)Anthropicbravenoindistinguishable from an ordinary browser
Arc (sunsetting)The Browser Company (Atlassian)not statednoindistinguishable from an ordinary browser
Mozilla Firefox (AI chatbot, Link Previews, Smart Window)Mozillanot statednono visits of its own: answers about the open page or searches
Yandex Browser with Alice AIYandexyandex (YandexBot, YandexAdditional)cite --provider yandexno visits of its own: answers about the open page or searches
Apple Safari with Apple IntelligenceAppleapple (Applebot, Applebot-Extended)nono visits of its own: answers about the open page or searches
Samsung Internet (Samsung Browser) with Browsing AssistSamsungperplexitycite --provider perplexityindistinguishable from an ordinary browser
Opera One / Opera GX with Opera AI (formerly Aria)Operanot statednono visits of its own: answers about the open page or searches
DuckDuckGo browser with Duck.aiDuckDuckGobing (DuckAssistBot, DuckDuckBot)noreferrer duck.ai
Kagi OrionKaginot statednono visits of its own: answers about the open page or searches
Vivaldi (no-ai)Vivaldi Technologiesnot statednono AI surface
ChatGPT Atlas (closed)OpenAInot statednoindistinguishable from an ordinary browser

Usage

usage: indexgap doctor [-h] [--site SITE] [--home HOME] [--config CONFIG]
                       [--profile PROFILE] [--sitemap SITEMAP] [--live]
                       [--indexed [engine=]file.csv] [--logs access.log]
                       [--baseline old-doctor.json] [--history reports/]
                       [--probe-bots] [--probe-robots] [--verify-bots]
                       [--online] [--cite indexgap-cite.json] [--market CN]
                       [--send] [--out OUT]
                       [root]

positional arguments:
  root                  directory of pages; taken from indexgap.json by
                        default

options:
  -h, --help            show this help message and exit
  --site SITE           the full site address; taken from indexgap.json by
                        default
  --home HOME           URL of the home page; defaults to --site itself
  --config CONFIG       path to indexgap.json; looked for next to the pages by
                        default
  --profile PROFILE     content type: catalog, events, ugc. Changes thresholds
                        and which checks run — see `indexgap profiles`;
                        business: saas, ecommerce, local, media, marketplace,
                        app, devtools, ymyl — with a page-type check
  --sitemap SITEMAP     path or URL of sitemap.xml; by default sitemap.xml in
                        the pages directory, if it is there
  --live                check live the addresses the engine knows but the site
                        does not contain: is there a redirect, is the host
                        closed. Uses the network
  --indexed [engine=]file.csv
                        an indexation export or Copilot citations from Bing AI
                        Performance; repeat it for different sources
  --logs access.log     the server's access log (combined or JSON lines, .gz
                        is fine): which pages AI search bots fetched; repeat
                        for several files
  --baseline old-doctor.json
                        a previous doctor JSON: what dropped out and came back
                        since that run, which sections became gaps
  --history reports/    a history folder: the run is saved there, compared
                        with the previous one in it, and trend.html is drawn
                        beside it
  --probe-bots          open the home page as a browser and as every bot with
                        a documented User-Agent (indexgap/data/bots.json:
                        OpenAI, Anthropic, Perplexity, Mistral, Meta,
                        Googlebot, bingbot, Baiduspider) and compare the
                        responses: a refusal to the bot alone is the bot-
                        blocked-cdn finding. Uses the network
  --probe-robots        read the site's robots.txt over the network and
                        compare it with the build's robots.txt: what the CDN
                        added (Cloudflare managed robots.txt, Content-Signal
                        lines). Uses the network
  --verify-bots         check the bot addresses from --logs against published
                        ranges and DNS and drop spoofed ones. Uses the network
  --online              turn on every network read of this command: --live,
                        --probe-bots, --probe-robots, --verify-bots. Writes
                        nothing to outside services — only --send does that
  --cite indexgap-cite.json
                        the output of `indexgap cite --send`: cited pages join
                        the funnel and the gaps by section
  --market CN           market: CN — readiness checks for China and Baidu
                        (resources unreachable from China, hreflang,
                        Baiduspider in robots.txt, verification in Baidu,
                        hosting from the --probe-bots headers). Can come from
                        "markets" in indexgap.json
  --send                with --market CN: send the Chinese pages to Baidu link
                        push (key in BAIDU_PUSH_TOKEN); without the flag — a
                        dry run
  --out OUT             where to write the HTML report; the machine-readable
                        data goes next to it with a .json extension. A name
                        ending in .json names the data, and the report goes
                        next to it as .html

The rest of the pipeline

← profiles · crawlers →