# How JavaScript rendering affects SEO

> Content that only appears after JavaScript runs is indexed later and less reliably. Server-render what must rank.

Technical SEO · HTML version: https://getreport.app/learn/javascript-rendering

## SEO tags changed by JavaScript

Passing looks like: JavaScript leaves the title, canonical and robots tags alone.

**Why it matters.** Search engines read the HTML first and the rendered page later, if at all. A canonical or noindex that JavaScript changes sends two different instructions, and Google may act on either.

**How to fix it.**

1. Put the final title, description, canonical and robots tags in the HTML the server sends.
2. In a single-page app, set them on the server for each route (Next.js metadata, Nuxt useHead with SSR, Angular Universal).
3. Never add noindex with JavaScript to a page you want indexed; Google may drop it before the script runs.

## Content that needs JavaScript

Passing looks like: The visible text is present without JavaScript.

**Why it matters.** Google renders JavaScript later and with a budget, so text that only appears after scripts run can be indexed late or not at all. Other search engines and link previews may never see it.

**How to fix it.**

1. Serve the main content in the HTML (server-side rendering or static generation) and use JavaScript only to enhance it.
2. Check the difference in the technical detail; menus and widgets are fine, headlines and body copy are not.

Check your own page: https://getreport.app/
