Different title in raw HTML and after JavaScript: which one does Google read?

In brief

Your raw HTML title is not the same as the one shown after JavaScript runs: Google and AI systems read the raw title, often a generic fallback. You need to set the title server-side so the indexed version is the one you actually wrote.

WarningP3 — Quality

What is it?

The title in the raw HTML differs from the one displayed after JavaScript executes.

Why it hurts SEO and AI

Google may index the raw version's title (often a generic one like "App"), not the one you think you have. LLMs see almost only the raw title. You are optimizing around a title the machines never read.

When it is NOT a problem

  • The raw HTML title is already correct and the JavaScript version just repeats it identically: no real gap.
  • The page is not meant to be indexed or cited (app interface, logged-in screen): the title Google sees barely matters.
  • The gap is only a difference in spacing or casing with no change in meaning: cosmetic, with no SEO impact.
Before
<!-- Raw HTML returned by the server -->
<title>App</title>
<!-- after JavaScript, in the browser -->
<title>Men's trail running shoes - Brand</title>
After
<!-- Raw HTML returned by the server -->
<title>Men's trail running shoes - Brand</title>

On the left, Google indexes "App". On the right, the real title is present in the raw HTML, before any JavaScript runs.

How to fix it

  1. View the page's real source (right-click then View page source, not the inspector) and read the <title> tag as it arrives from the server.
  2. Find the client component that rewrites the title afterwards (SPA router, browser-side head hook).
  3. Move the title definition into server-side rendering (SSR head) so it is correct in the HTTP response itself.
  4. Re-crawl the page and confirm the raw title now matches the displayed title.

This scan checks what is missing from the raw HTML but appears in the JavaScript render

Is this issue on your site?

Is the title Google indexes really the one you wrote? Enter a URL: Seogard compares the raw HTML title with the JavaScript-rendered one and shows you the gap in 30 seconds. Free, no credit card.

  • No credit card
  • Result in ~30 s

What you get back

The title that gets indexed and cited finally matches the one you wrote.

Seogard catches this regression automatically — through its SSR checker.

Frequently asked questions

Does Google eventually see the JavaScript-rendered title?

It may see it on its second rendering pass, but it has already indexed the raw title in the meantime, and AI answer engines almost only read the raw version.

How do I know which title is actually indexed?

Look at the title in the source (Ctrl+U) without running JavaScript: that is the one Google prioritizes, not the one in the browser tab.

Related rules

Updated July 10, 2026