top of page
  • Writer's pictureBrent Payne

Meta robots found outside of <head>

The examined URL contains meta robots instructions in the HTML document, but they are positioned outside of the <head> section.

Why is this important?

The proper placement for meta robots tags is within the <head> section of your HTML document. If these tags are located in the <body> section, search engines will still honor them, which may be an unexpected behavior for some webmasters.

The illustration from Gary Illyes of Google highlights an extreme case where the robots directive is 'noindex', possibly leading to unrecognized indexing issues.

What does the Optimization check?

When a meta robots tag is found within the HTML content but outside of the <head>, this hint is activated for the internal URL under inspection.

Examples that trigger this Optimization:

Take the URL:

The Optimization would be activated for this URL if a meta robots tag appears outside the <head> section, such as:

<!doctype html><html lang="en"><head>  <title>example</title>  ...</head><body>  ...  <meta name="robots" content="noindex">  ...</body></html>

This Optimization could also be set off by invalid HTML elements which disrupt the <head> section, causing the <body> section to begin prematurely and the robots tag to be mistakenly placed within it.

How do you resolve this issue?

This Optimization is classified as 'Critical' as it points to a significant problem that could profoundly affect organic search traffic. Immediate action for Critical issues is highly advised.

Often, the root cause is a broken <head> section. If the Googlebot encounters this, the robots tag might be inaccurately moved into the body section. Verify if any related issues are also highlighted:

  • <head> contains invalid HTML elements

  • <head> contains a <noscript> tag, which includes an image

Solving these related issues might also remedy the meta robots problem.

However, if these hints aren't the cause, further investigation is required to identify a possible configuration or scripting error on the page, leading to the misplaced robots tag.

Investigate both the 'View Source' and the rendered DOM (using tools like 'Inspect' in Chrome DevTools) to ascertain how the rogue tag is being introduced into the body. Try different crawling methods, such as using Sitebulb's HTML Crawler or the Chrome Crawler, to see if the result varies.

To correct the mistake, the robots tag must be relocated from the <body> to the <head>, potentially requiring the assistance of a developer.

Further Reading

  • Problems with placing a noindex tag in the body of your page

  • The Magically Moving Meta Robots Tag And The Risks It Poses [Case Study]


Recent Posts

See All

ClubReq Gets A Link (Because They Asked)

I am a mentor for Techstars and have been for over 10 years. In those ten years I have mentioned to startups to ask ANYONE and everyone that they meet to link to their site. Yet, in all those times on


bottom of page