Skip to content
Documentation

Rule catalogue

Every rule goflag can report: 25 judged per page, 28 across the whole site, 5 it states but will not answer, plus the hreflang reciprocity codes.

Page rules

Judged on one page at a time, from its <head>. Each rule is a pure function of the page, which is why a finding can always be reproduced from the URL alone.

RuleSeverityRigorWhat it checks
canonical.absoluteerrorvendor-spec`rel="canonical"` must be an absolute, fully-qualified URL
canonical.missingwarningvendor-specDeclare a `<link rel="canonical">` so search engines pick the right URL
description.lengthwarningheuristicKeep descriptions between 50 and 160 characters
description.missingwarningspec-recommendedProvide a `<meta name="description">` on every indexable page
icons.apple-touch.missinginfovendor-specDeclare an `apple-touch-icon` for the iOS home screen
icons.manifest-mismatchinfoguidelineThe manifest and the `<head>` must not disagree about the same icon
icons.missingwarningguidelineDeclare an icon — the tab, the bookmark and the share sheet all read one
icons.sizes-mismatchinfoguidelineA `sizes` attribute must describe the file it points at
icons.unreachablewarningvendor-specA declared icon has to answer with an image
og.description.missinginfovendor-specSet an explicit `og:description` for richer link unfurls
og.image.absolutewarningvendor-spec`og:image` must be an absolute URL
og.image.altwarningguidelineDescribe the shared image with `og:image:alt`
og.image.alt.captioninfoguideline`og:image:alt` describes the image, it does not repeat the title
og.image.dimensionswarningvendor-specDeclare `og:image:width` and `og:image:height`
og.image.missingwarningvendor-specProvide at least one `og:image` so links unfurl with a preview
og.image.ratioinfovendor-specKeep the shared image near the 1.91:1 the card is laid out for
og.image.reachableerrorvendor-specThe URL in `og:image` has to answer with an image
og.image.sizes-mismatchwarningguideline`og:image:width` and `og:image:height` must be the image's real size
og.locale.alternateswarningvendor-spec`og:locale:alternate` and the hreflang cluster must name the same locales
og.locale.missingwarningvendor-specA translated page has to say which locale it is in
og.title.missingwarningvendor-specSet an explicit `og:title` instead of relying on `<title>` fallback
robots.conflicterrorvendor-spec`robots`, `googlebot`, and `X-Robots-Tag` must not contradict each other
title.lengthwarningheuristicKeep `<title>` between 10 and 60 characters
title.missingerrorspec-requiredEvery page needs a non-empty `<title>`
viewport.missingwarningguidelineDeclare a `<meta name="viewport">` so mobile browsers render at the right scale

Site rules

Judged across the whole crawl, because no single page carries the evidence. Fixing one of these usually fixes a whole column of findings at once.

RuleSeverityRigorWhat it checks
hreflang.cluster-incompletewarningvendor-specEvery locale the sitemap publishes must appear in the route's `hreflang` cluster
hreflang.missingerrorvendor-specPages on a multilingual site must advertise their locale alternates
icons.ico.missinginfoguidelineServe a `/favicon.ico` at the root for the clients that ask blind
robots.blocks-pageerrorvendor-specA page asking to be indexed must not be disallowed by robots.txt
robots.blocks-siteerrorvendor-spec`robots.txt` must not forbid crawling a site that asks to be indexed
robotstxt.cross-originwarningvendor-spec`/robots.txt` should not redirect to another origin
robotstxt.invalid-linewarningspec-requiredEvery line of robots.txt should parse as something
robotstxt.oversizederrorspec-requiredRules past 500 KiB of robots.txt are not guaranteed to be read
robotstxt.sitemap.relativeerrorspec-requiredA `Sitemap:` declaration must be an absolute URL
robotstxt.unknown-directiveinfoguidelineNon-standard robots.txt directives are read by some crawlers and ignored by others
robotstxt.unreachableerrorspec-requiredA robots.txt that errors is read as forbidding the whole site
sitemap.emptywarningguidelineA sitemap that parses should list something
sitemap.entry.blocked-by-robotserrorvendor-specA sitemap must not list URLs that robots.txt forbids fetching
sitemap.entry.cross-hosterrorspec-requiredA sitemap should only list URLs on its own host
sitemap.entry.invalid-urlerrorspec-requiredEvery `<loc>` must be an absolute, parseable URL
sitemap.entry.noindexwarningvendor-specA sitemap must not list URLs that ask not to be indexed
sitemap.entry.non-canonicalwarningvendor-specA sitemap should list canonical URLs
sitemap.entry.out-of-scopeerrorspec-requiredA sitemap may only list URLs under its own directory
sitemap.entry.protocol-mismatchwarningspec-requiredA sitemap should not mix `http` and `https` entries
sitemap.entry.redirectswarningguidelineA sitemap should list final URLs, not URLs that redirect
sitemap.entry.unreachableerrorvendor-specEvery URL a sitemap lists must answer
sitemap.field.invalidwarningspec-required`<changefreq>` and `<priority>` must hold the values the protocol defines
sitemap.index.child-errorerrorspec-requiredEvery child of a sitemap index must be reachable and parseable
sitemap.lastmod.invalidwarningspec-required`<lastmod>` must be a W3C Datetime, and must not be in the future
sitemap.limits.exceedederrorspec-requiredNo single sitemap document may exceed 50,000 entries or 50 MB
sitemap.missingwarningguidelineA site should publish a sitemap
sitemap.orphanswarningguidelineIndexable pages the crawl found should be listed in the sitemap
sitemap.unparsableerrorspec-requiredA located sitemap must be a well-formed `<urlset>` or `<sitemapindex>`

Rules goflag will not answer for you

Whether a title describes the page is not something a linter can decide. goflag could fake it — count words, match boilerplate, print a confident verdict — and the result would be unfalsifiable noise. So it states the question, cites what makes it a real requirement, attaches the observed facts, and stops. Ask for them with --advisories; they carry no severity, never count toward the verdict, and are only asked where the subject exists.

RuleSeverityRigorWhat it checks
description.accurateguidelineThe meta description summarizes this page truthfully
hreflang.sitemap-mismatch`<head>` alternates advertise a locale the sitemap does not list
lang.matches-contentspec-requiredThe declared `lang` is the language the page is actually written in
og.image.representativeguidelineThe `og:image` represents this page and survives the unfurl crop
title.descriptiveguidelineThe `<title>` describes this specific page

hreflang reciprocity codes

Computed cross-page and reported under missingTranslations.reciprocity rather than through the rule registry, which is why they carry a code instead of a severity. See Translations.

missing-back-link

hreflang is only honoured when it is reciprocal. A one-way declaration is discarded, so the cluster silently degrades to no cluster at all.

`/fr/pricing` declares an alternate to `/es/precios` but the peer does not link back.

x-default-missing

`x-default` is what a visitor whose language matches none of yours is sent to. Without it the engine guesses, and it guesses per query.

Page advertises 4 locales but no `hreflang="x-default"`.

locale.invalid

An invalid tag is not a fallback, it is ignored: underscore instead of hyphen is enough to void the entire alternate.

`hreflang="pt_BR"` is not a valid BCP 47 tag.

What rigor means

Every rule judged on a single page records how authoritative the requirement behind it is, and cites at least one document that backs it. The three site rules do not yet — they run on the contract that predates the catalogue, so the table above shows for them, and the exported catalogue emits rigor: null rather than a rigor nobody assigned. This is the honest answer to “says who?”: a heuristic is folklore you may knowingly ignore, a spec-required is not. A rule can never claim more authority than its strongest source carries — that is enforced in CI, not left to good intentions.

spec-required
A published standard says the page MUST do this. Not a matter of taste.
spec-recommended
A standard says SHOULD: expected practice, with room for a deliberate exception.
vendor-spec
A de-facto specification a single vendor controls — Open Graph, Google's canonicalization rules. Binding on the consumers that implement it, not on the web.
guideline
Documented best practice from a source worth trusting. No specification behind it.
heuristic
Industry folklore. Often useful, occasionally wrong, and never something to fix as though a standard demanded it.

Rigor is a fact about the world, so no option changes it. What your build should do about each rule is a separate question, and that is what profiles answer.

heuristicThe length thresholds cite no specification

title.length and description.length cite Google and Moz, and neither is a standard: Google states outright that title length is not a ranking factor. They ship as the display conventions they are, which is why --profile spec-only switches them off entirely rather than merely quieting them.