Skip to main content
Preparing workspace

HTML Head SEO Inspector

Inspect every tag in a page's HTML head with line numbers: tags that close the head early and hide canonical or hreflang, robots and Open Graph. Free.

Still loading. If the tool doesn’t appear, reload this page.

About this tool

HTML Head SEO Inspector

Inspect every tag in a page's <head> with line numbers: elements that close the head early and hide canonical or hreflang, charset, viewport, title, description, robots, canonical, hreflang, social tags, icons and render-blocking scripts.

An HTML head SEO inspector lists every element in a page's <head> in source order, with its line number, and checks the tags search engines rely on. Enter up to ten URLs or paste HTML. The most serious problem it finds is one most tools miss: an element that isn't allowed in the head, such as an <img>, <iframe> or <div> injected by a tracking script, a cookie banner or a page builder. HTML parsers, including Google's, end the head at that element and treat everything after it as body content, and Google ignores canonical, hreflang and robots tags found in the body. The inspector shows the exact line where the head breaks and which SEO tags are lost. It also checks the character encoding and its position, the viewport (including zoom blocking that fails accessibility), the title and meta description (missing, duplicated, empty or too wide), robots meta tags and the X-Robots-Tag header (noindex, nofollow, nosnippet, conflicting tags), the canonical (missing, duplicated, relative, pointing elsewhere or contradicting the HTTP Link header), hreflang (invalid codes such as en-UK, duplicates, missing x-default or self-reference, relative URLs), the html lang attribute, <base> and meta refresh, Open Graph and Twitter tags, favicons, render-blocking scripts, preloads without as or crossorigin, too many preconnects and an oversized head.

How to use HTML Head SEO Inspector

  1. 1

    Enter one URL per template (home, category, product, article), or paste a page's HTML.

  2. 2

    Press Inspect head to list every head element with its line number.

  3. 3

    Fix errors first, especially an element that closes the head early.

  4. 4

    Open 'All head elements' to see every tag in order with line numbers, and any tags that are ignored.

  5. 5

    Download the CSV for your developers and re-check after the fix.

Why use HTML Head SEO Inspector

  • Finds the broken head

    Shows the line where an invalid element ends the head and which SEO tags are lost.

  • Every tag, in order

    A full list of head elements with line numbers, like an X-ray of View Source.

  • Headers too

    Checks X-Robots-Tag and the HTTP Link canonical against the HTML.

  • SEO, mobile and speed

    Indexing tags, viewport and accessibility, social tags and render-blocking resources in one pass.

Why an element can hide your canonical

Only a few elements are allowed in the head: title, meta, link, script, style, noscript, base and template. When the parser meets anything else, it closes the head and starts the body. Everything after that point, including link rel=canonical, hreflang links and the robots meta tag, ends up in the body, where Google ignores it. Scripts that write an image or iframe at the top of the head, and noscript tracking pixels, are common causes.

Render-blocking resources

A script in the head without async or defer stops the browser from rendering until it has downloaded and run, which delays Largest Contentful Paint. Add defer to scripts that need the DOM, async to independent ones, preload only critical resources with the right as attribute, and keep preconnects to the few origins that matter.

Common use cases

  • An SEO finds that a tracking pixel at the top of the head made Google ignore the canonical and hreflang tags.
  • A developer checks a new template's head before release.
  • A WordPress site discovers that the theme and an SEO plugin both output a title and a meta description.
  • An international site catches en-UK hreflang codes and a missing x-default.

Frequently asked questions

What does 'closes the head early' mean?

An element that isn't allowed in the head, such as an image or iframe, makes the HTML parser end the head. Tags after it are moved into the body, and Google ignores head-only tags like canonical and hreflang there.

Link to answer
Does it run JavaScript?

No. It reads the HTML as served, the same first pass search engines make. If a tag manager adds tags later, paste the rendered HTML from your browser's developer tools.

Link to answer
Are the line numbers exact?

Yes, they refer to the HTML the server returned (or that you pasted), as in View Source.

Link to answer
Which HTTP headers are checked?

For fetched pages: X-Robots-Tag, the Link header canonical and the Content-Type charset.

Link to answer
How many pages can I inspect?

Up to ten URLs per run, or paste one page's HTML.

Link to answer
Is anything stored?

No. Each URL's head section is read once when you press inspect, and pasted HTML never leaves your browser.

Link to answer