Skip to content
Plumb
Light theme onCheck a URL

DocsMobile SEO

Bulk AMP Validator

Validate up to 100 AMP pages with the official AMP validator, and check that each AMP page and its canonical page point at each other.
  • Official validator
  • Up to 100 URLs
  • Follows rel=amphtml
  • Live progress
  • JSON API

What it Checks

Each URL is fetched as the user agent you chose. When it is an AMP document (<html amp> or <html ⚡>), its HTML goes through the official AMP validator, the same one the AMP project publishes; you get every error and warning with its line, column and a link to the spec.

When the URL is a regular page, the tool follows its <link rel="amphtml"> and validates the AMP version instead.

It then checks the pairing: the AMP page must have a rel="canonical", and the canonical page must link back with a rel="amphtml" pointing to the same AMP URL. URLs are compared after redirects, ignoring a trailing slash, the fragment and http versus https. An AMP page that is its own canonical, or whose canonical is itself an AMP page, is a standalone AMP page and passes.

Run a Test

  1. Paste the URLs, one per line: AMP pages, or regular pages that link to their AMP version (up to 100).
  2. Pick the user agent. Googlebot Smartphone is the default.
  3. Press Validate. Progress shows each URL as it finishes; you can cancel. The verdict reads Valid AMP., Invalid AMP., Not an AMP page. or, for several URLs, for example 2 of 10 URLs are not valid AMP.
Open the Bulk AMP Validator

Options

  • User agent. Sent with every request: the URL, the AMP version and the canonical page. Pick a browser if the site serves crawlers differently or blocks them. The ids are in the user-agent list.

Reading the Result

  • Errors, Warnings: totals over all URLs. Errors make a page invalid AMP; warnings do not.
  • Pairing: how many URLs have a canonical page that doesn't link back, and how many link back through a redirect.
  • Not tested: URLs that answered an error status or whose request failed.
  • Results: one row per URL with the AMP URL tested, its status, the result, the error and warning counts and the Canonical ↔ AMP pairing: ok, standalone, via redirect (the canonical page links to an older AMP URL that redirects: link the final URL) or broken. Expand a row for the canonical URL and its status, each validator message and a note on what was tested.
ResultMeaning
ValidThe validator passed the AMP page.
InvalidThe validator found at least one error.
Not AMPThe page isn't AMP and has no rel="amphtml", or the AMP URL it links to doesn't serve an AMP document.
not testedThe URL or its AMP version answered an error status, or a request failed; the note says why.

Good to Know

  • The validator is downloaded from the AMP project on first use, so the rules are always current.
  • Pages are fetched as HTML, without running JavaScript, five at a time.
  • How canonicals work: the rel="canonical" guide.

API

POST /api/amp

Send the URLs as one string, one per line, and optionally the user-agent id (Googlebot Smartphone when it is missing or unknown). The answer is JSON with the rows in input order. result is Valid, Invalid, Not AMP or Error (shown as not tested); pairing is ok, standalone, redirect, broken or null (not checked); canonicalLinksBack is false only when the pairing is broken. With "stream": true the answer is NDJSON: a {"type": "row", "done", "total", "url", "result"} line per URL, then {"type": "done", "rows"}.

Request
curl -X POST https://plumb.reacthive.dev/api/amp \
  -H "content-type: application/json" \
  -d '{
    "urls": "https://www.hindustantimes.com/",
    "agent": "googlebot-smartphone"
  }'
Response (Trimmed)
{
  "rows": [
    {
      "input": "https://www.hindustantimes.com/",
      "ampUrl": "https://www.hindustantimes.com/amp",
      "status": 200,
      "isAmp": true,
      "result": "Valid",
      "errors": [],
      "canonical": "https://www.hindustantimes.com/",
      "canonicalStatus": 200,
      "pairing": "ok",
      "canonicalLinksBack": true,
      "note": "Tested the AMP page linked from this URL."
    },
    {
      "input": "https://www.example.com/article/amp/",
      "ampUrl": "https://www.example.com/article/amp/",
      "status": 200,
      "isAmp": true,
      "result": "Invalid",
      "errors": [
        {
          "severity": "ERROR",
          "line": 42,
          "col": 4,
          "message": "The tag 'img' may only appear as a descendant of tag 'noscript'. Did you mean 'amp-img'?",
          "specUrl": "https://amp.dev/documentation/components/amp-img",
          "code": "MANDATORY_TAG_ANCESTOR_WITH_HINT"
        }
      ],
      "canonical": "https://www.example.com/article/",
      "canonicalStatus": 200,
      "pairing": "redirect",
      "canonicalLinksBack": true,
      "note": "The canonical page's rel="amphtml" points to https://www.example.com/amp/article/, which redirects to this AMP page: link the final URL."
    }
  ]
}