Skip to content
Documentation
Rule catalogue

title.missing

Every page needs a non-empty <title>

errorper pagespec-required

Why it matters

The title is the clickable line in every search result and the label of every browser tab. Without one, the engine invents a replacement from the page body, and the page competes with a heading someone wrote for a different purpose.

What the finding looks like

The message goflag prints, with example values substituted.

error title.missing Page is missing a <title> element (or it is empty).

Add a <title> to <head>

Written for the Next.js App Router. The finding is correct on any stack; only the remedy assumes one.

// app/…/page.tsx — App Router owns the <head>; never hand-write the tag.
export const metadata = { title: "Page name — Site name" };

Says who?

This rule is spec-required, and it cites the documentbelow. Nothing here is goflag’s opinion of what a good page looks like — if you disagree with a finding, this is what you are disagreeing with.