Issues

Hreflang: Outside <head>

back to issues overview

Outside <head>

Pages with an hreflang link element that is outside of the <head> element in the HTML.

The hreflang link element should be within the <head> element, or search engines will ignore it.

How to Analyse in the SEO Spider

View URLs with this issue in the ‘Hreflang’ tab and ‘Outside <head>’, filter and export all URLs using the ‘Export’ button.

Check to see if there are any ‘Invalid HTML Elements in Head’ under the ‘Validation’ tab, that could be the cause.

If this issue has also been triggered, use our ‘How To Debug Invalid HTML Elements In The Head‘ tutorial to debug.

What Triggers This Issue

This issue occurs when pages feature an hreflang link element located outside of the <head> element in the HTML.

Example:

<!DOCTYPE html>
<html>
<head>
...
</head>
<link rel="alternate" hreflang="en-gb" href="https://www.screamingfrog.co.uk/technical-seo/" />
<link rel="alternate" hreflang="en-us" href="https://www.screamingfrog.com/us/technical-seo/" />
<body>
...
</body>
</html>

How To Fix

Ensure hreflang link elements are in the <head> element of a page’s HTML to be used by search engines.

Further Reading

Back to top