JavaScript rendering · Raw and rendered HTML

Title changed by JavaScript

The server sends this page with one title, and a script replaces it with a different title once the page loads in a browser.

How this page is built

A script in the head sets document.title to a new value as soon as it runs. Crawlers that read only the raw HTML see the original title, and those that render see the new one.

Why it matters

The title is one of the strongest signals of what a page is about, and it is usually the headline in search results. When the raw and rendered titles differ, crawlers that do not render see one and Google may use the other. The result is hard to predict.

Changed titles often come from front-end frameworks, personalisation or A/B testing tools.

How to check it

Compare the raw HTML (view source) with the rendered HTML (the Elements panel in developer tools, or the URL Inspection tool in Search Console). Crawl tools that render JavaScript can store both versions and report differences between them. Here, the title differs between the two.

How to fix it

Send the final title in the raw HTML and stop scripts from changing it.

Back to all tests