Missing DOCTYPE: fix quirks-mode rendering
Without <!DOCTYPE html>, browsers and Googlebot render in quirks mode, which can break layout and hide content. Find pages missing a DOCTYPE free and add the single line that fixes it.
What it means
The page's HTML does not begin with <!DOCTYPE html>. Without this declaration, every major browser — and Googlebot's Chromium-based Web Rendering Service — enters quirks mode, a legacy compatibility state that emulates late-1990s browser behaviour for the box model, CSS cascade and several JavaScript APIs.
Why it matters
The HTML5 spec makes the DOCTYPE mandatory; its absence changes how the document is parsed and rendered. Google's renderer honours the quirks-mode trigger, and quirks mode affects CSS layout — particularly the box model and table rendering — which can position or hide elements differently than intended. If headings, body text or structured-data markup end up misplaced or hidden in the rendered DOM, Googlebot cannot index what it cannot see. The fix is one line with no downside.
How to fix it
- Add
<!DOCTYPE html>as the absolute first line of every HTML document, before the<html>tag and any whitespace or byte-order mark. - In a CMS or templating system the DOCTYPE lives in the root layout — WordPress
header.php, or the base template — so one fix propagates everywhere. - If a CDN or reverse proxy is stripping the first line, inspect the raw response with
curl -iand fix at the origin.
When it's not a problem
There is no legitimate production scenario where omitting the DOCTYPE is intentional or safe for an HTML page. Pages served as XML (application/xhtml+xml) use a different document model and do not require the HTML DOCTYPE — those are not the target of this check.
How common is it?
640 audited sites in our corpus currently show this issue. The breakdowns below show which platforms, gatekeepers, verticals and countries are most exposed.
Audit your own site — free
157 checks, internal PageRank, render-diff. No signup, results in ~30s.