CLI command
seo deploy-check and seo deploy-checks
A site's robots.txt and sitemaps read as they are served now: every sitemap URL the crawler's robots rules block or that does not answer a successful status, with an exit status a deploy pipeline can stop on, each check stored with who made it and read back over deploys.
Invocation#
echo-cli seo deploy-check --origin <https origin> --crawler <user-agent token> --by <name> [--sitemap <https url>]...
echo-cli seo deploy-checks --origin <https origin>Inputs and output#
deploy-check writes the stored check: id, origin, robots_status, crawler, named_sitemaps (every --sitemap), sitemaps (each sitemap read: url, answer — its status or the error that stopped it — and how many URLs it listed), unreadable (the sitemaps that could not be read or did not answer 2xx), problems (each listed URL blocked or not answered 2xx: url, answer and blocked_by, the deciding rule when robots blocks it), checked (how many URLs the sitemaps listed), checked_by and checked_at. It exits 1 when problems or unreadable is not empty, and 0 otherwise. deploy-checks writes the site's stored checks in the same shape, newest first, and exits 0 whatever they found.
State effect#
deploy-check posts to Echo Web's authenticated /api/seo/deploy-check and deploy-checks reads it, with ECHO_INTERNAL_BEARER at ECHO_WEB_BASE_URL; the Deploy check section of the GEO screen (the signed-in admin is the checker) and of Echo Desktop's GEO screen call the same operations, each with Stored checks, and echo-mcp runs them as echo_seo_deploy_check and echo_seo_deploy_checks. robots.txt is read as RFC 9309 defines it (https://www.rfc-editor.org/rfc/rfc9309): the group naming --crawler, else the group of *, and the longest matching rule decides, an allow winning a tie. The sitemaps are those robots.txt declares and every --sitemap; a sitemap index is followed. Each address must be a credential-free public https address; redirects are not followed, so a sitemap URL that redirects is reported with its 3xx status. Every check that reached the site is kept in seo_deploy_checks; a refused one stores nothing.
Refusals#
- A wrong invocation is refused before anything is sent: "seo takes deploy-check …; got <word>", "seo deploy-check does not take <flag>; it takes --origin, --crawler, --by, --sitemap", "<flag> needs a value" and "seo deploy-check needs <flag>" (and seo deploy-checks needs --origin).
- Echo Web answers a bad request with "origin is required: the https origin of the site to check, such as https://example.com; got <value>", "crawler is required: the user-agent token whose robots rules decide, such as Googlebot or *", "checked_by is required: an internal caller has no signed-in user, so it names who is acting", "sitemaps must be a list of https sitemap addresses to check beside the ones robots.txt declares; got <value>" or, reading, "origin is required: the https origin whose stored deploy checks to read; got <value>"; not found with "<origin>/robots.txt declares no sitemap and none was named; name one with sitemap=<https url>"; and fails with "Only credential-free HTTPS URLs on the default port are allowed" or the address check's own cause when the origin is not a public https address. The command prints Echo Web's sentence and exits 1.