Site crawler (SEO → Crawl)

For developersVersion 1.0.0Last updated:

Module includes/modules/class-builder-os-crawl.php and includes/modules/crawl/. Free and local: no external SEO APIs. View rastreo (builder_os_seo_views and builder_os_seo_view_rastreo) and “Site crawl” card in builder_os_seo_overview.

  • URLs. Home page, posts, pages and published public content types (including bos_pseo rows), archives and terms with content. Cap “Maximum URLs per crawl”: 500 by default, from 10 to 5000. Filter builder_os_crawl_urls.
  • Run. Tables with the queue, so it can be resumed. Phases pages (GET only to the site’s own host, no cookies, 10 s, UA BuilderOS-Crawler, ?bos_crawl=1 bypasses the page cache), targets (internal destinations outside the list: HEAD), external (HEAD and, if it fails, GET Range: bytes=0-0, with wp_safe_remote_*, 0.25 s between requests to the same host, 20 per host, 200 per crawl) and analyze. One crawl at a time (lock in an option), 20 s per tick and 30 URLs per batch. It never runs on front-end requests: the jobs module (crawl.step) or WP-Cron (builder_os_crawl_step) advances it, plus an optional weekly crawl (builder_os_crawl_weekly); the open screen also pushes ticks via admin-ajax.
  • Security (SSRF). External URLs must be http(s) with a public host (private, reserved, loopback, link-local and CGNAT ranges, and IPs with odd notations, are rejected; each DNS response is checked). Redirects are followed manually (3 hops), revalidating each one. HTML is never requested from other hosts. Limits: 2 MB of HTML per page and 5 hops on own URLs (loops detected).
  • Data. Tables bos_crawl_pages, bos_crawl_links and bos_crawl_issues; only the last two crawls are kept. Options builder_os_crawl_state, builder_os_crawl_settings, builder_os_crawl_db and builder_os_crawl_lock.
  • Problems. page_error, broken_internal, broken_external (404, 410, 5xx or no response; 401, 403, 405, 429 and 999 don’t count), redirect_loop, redirect_chain (2 or more hops), link_to_redirect, orphan, deep (more than 3 clicks from the home page), dup_title, dup_desc, dup_h1 (indexable only), no_canonical, canonical_other, noindex_linked and schema_error (invalid JSON, missing @type or required properties of Organization, LocalBusiness, Product, Service, Article, BreadcrumbList and FAQPage).
  • Internal PageRank. 20 iterations, damping 0.85, dangling-node mass redistributed, normalized to a mean of 1 and shown from 0 to 100.
  • Actions and CSV. “Analyze now” and “Cancel”. “Create redirect” opens the manager with bos_from preloaded. CSV via admin-post.php?action=bos_crawl_csv (nonce, manage_options, BOM, formula-safe with Builder_OS_SEO::csv_cell; set=issues|links, optional type).
  • MCP (seo group). crawl_get_report (read-only; type and limit 1 to 200, 50 by default; reads what is already saved) and crawl_run (starts a crawl in the background; fails if one is already running).