Skip to content

Rule · SEO

<html lang> missing or not a valid BCP 47 tag

seo/html-langerrorvoid seoupdated

Why it matters

Screen readers, Bing, translation and agents use lang to process the text; an invalid tag is ignored.

How to fix it

Set a valid BCP 47 tag on the root element (en, en-GB, pt-BR).

Example

tsx
// app/layout.tsx
export default function RootLayout({ children }: { children: React.ReactNode }) {
  return <html lang="en"><body>{children}</body></html>
}

References

void seo reports 60 rules in this category. What search engines need from the raw response: status codes, titles and descriptions in <head>, self-referencing canonicals, one h1, crawlable links, Open Graph, icons, robots.txt and a sitemap with real dates.