Skip to content

JavaScript SEO checklist: 30 rules for rendering and markup

Google indexes the rendered HTML, meaning the page after JavaScript has run. Not all bots run JavaScript. For sites built as single-page apps or with client-side rendering, a lot depends on whether page title, main heading, canonical tag, links and copy are already in the initial HTML. This page also covers valid markup and working resources.

First check whether essential content and important links are in the initial HTML, and whether JavaScript changes the canonical URL or noindex. Then check the <head>: after an invalid element there, Google ignores everything that follows. Many markup rules concern accessibility or display rather than Google Search.

30 rules26 run dailyGoogle evidence checked on

Backed by Google4 · 13%
Google’s documentation recommends what the rule checks.
Partly backed15 · 50%
Google backs part of the rule. The rest goes further or is narrower.
No Google statement2 · 7%
Google does not address it directly. That does not make the rule useless.
Outside Google Search9 · 30%
It concerns accessibility, security, law or users, not Google Search.

Rendering and JavaScript 17

Backed by GoogleRuns daily

JavaScript does not change the canonical URL unintentionally

Check
Compares the canonical URL in the initial and rendered HTML of the same page state. Fails when JavaScript sets a conflicting target; relative and absolute forms of the same URL count as equal.
Fix
Serve the correct canonical URL from the start and fix the hydration code that overwrites it.
Google
Google allows setting the canonical URL with JavaScript but explicitly advises against changing it to a URL other than the one in the initial HTML.

rendering.canonical-stableRevision 1changed

Backed by GoogleRuns daily

The rendered HTML contains the intended meta description

Check
On pages meant to have a meta description, looks for a nonempty one in the rendered HTML. Fails when it is missing or empty.
Fix
Include the meta description in the initial HTML so it is reliably present after rendering.
Google
Google supports meta descriptions set or changed with JavaScript. That does not mean Google will show the description in the snippet.

rendering.description-presentRevision 1changed

Backed by GoogleRuns daily

The rendered HTML contains a page title

Check
Looks for a nonempty <title> element in the rendered HTML. Fails when a page that needs a title has none or an empty one.
Fix
Set the title tag in the initial HTML so it reliably survives rendering.
Google
Google recommends descriptive page titles and supports setting or changing them with JavaScript. A present title does not guarantee that Google shows it in search results.

rendering.title-presentRevision 1changed

Partly backedRuns daily

The rendered HTML contains the intended canonical tag

Check
On pages whose policy requires a canonical tag, checks the rendered HTML. Fails when rel="canonical" is missing or its target is empty.
Fix
Put the canonical tag in the initial HTML so it reliably survives rendering.
Google
Google picks up canonical URLs injected with JavaScript during rendering. A present tag says nothing about the right target or about which canonical URL Google selects.

rendering.canonical-presentRevision 1changed

Partly backedRuns daily

JavaScript does not replace the meta description unintentionally

Check
Looks at the initial and rendered HTML of the same route. Fails when JavaScript removes or replaces the intended meta description on first load without a documented reason.
Fix
Correct the initial HTML or hydration so the right meta description arrives reliably.
Google
Google allows JavaScript to set or change the meta description and does not require initial and rendered HTML to match. The rule only checks that the intended description survives.

rendering.description-stableRevision 1changed

Partly backedRuns daily

The rendered HTML contains the intended main heading (H1)

Check
Where the page policy requires an H1, checks the rendered HTML for a nonempty <h1>. Fails when it is missing or empty.
Fix
Output the H1 in the initial HTML so it is reliably present after rendering.
Google
Google's web developer guides recommend a meaningful heading structure. Google does not require every page to have an H1, or exactly one; the site owner sets that requirement.

rendering.h1-presentRevision 1changed

Partly backedRuns daily

JavaScript does not replace the main heading (H1) unintentionally

Check
Compares the H1 in the initial and rendered HTML of the same route. Fails when JavaScript removes or replaces the intended H1 on first load without a stated reason.
Fix
Make the initial HTML and hydration output the right H1 reliably.
Google
Google indexes the rendered HTML, and Google's web developer guides recommend a meaningful heading structure. Google states no requirement that the H1 match between initial and rendered HTML.

rendering.h1-stableRevision 1changed

Partly backedRuns daily

Resources needed for rendering load successfully

Check
During rendering, checks whether a resource marked as required, such as a script, stylesheet or API call, loads. Fails when it fails reproducibly.
Fix
Correct the URL, deployment, network policy or dependency of the failing resource.
Google
Google won't render JavaScript from blocked files and may skip resources that add nothing to essential content. Required resources matter; arbitrary network errors do not automatically prevent indexing.

rendering.required-resource-loadsRevision 1changed

Partly backedRuns daily

`noindex` and `nofollow` stay as intended after rendering

Check
Reads the noindex and nofollow directives in both the initial and the rendered HTML. Fails when rendering introduces a conflict with the intended directive.
Fix
Set the intended directives in the first response and keep them unchanged during rendering.
Google
If the initial HTML carries noindex, Google may skip rendering, so removing it later with JavaScript is unreliable. The rule goes further and also covers nofollow and other changes.

rendering.robots-directive-stableRevision 1changed

Partly backedRuns daily

Rendering triggers no JavaScript errors in the site's own code

Check
Records console output and exceptions during a browser render. Fails when an actionable runtime error from the site's own code occurs.
Fix
Fix the exception at its source and confirm the affected feature or content works again.
Google
Google optionally recommends collecting the JavaScript errors that users, including Googlebot, run into, since they can affect rendering. Google does not say every console error blocks indexing.

rendering.runtime-errorsRevision 1changed

Partly backedRuns daily

Essential content is in the initial HTML without JavaScript

Check
Compares the initial HTML with the content the intended crawlers need. Fails when essential content is missing or the server returns only a loading screen or app shell.
Fix
Render public content on the server, generate it statically or use prerendering.
Google
Google indexes rendered HTML but still recommends server-side rendering or prerendering, since it makes pages faster and not all bots run JavaScript. Google states no general requirement for it.
Note
The rule targets crawlers without JavaScript that the site owner wants to reach; Google itself renders JavaScript.

rendering.server-contentRevision 3changed

Partly backedRuns daily

JavaScript does not replace the page title unintentionally

Check
Tracks the page title from the initial to the rendered HTML of the same route. Fails when JavaScript changes the intended title on first load without a documented reason.
Fix
Align the initial HTML and hydration so the right title is in place from the start.
Google
Google explicitly allows changing page titles with JavaScript and does not require a match. The rule guards against unintended changes only.

rendering.title-stableRevision 1changed

Partly backed

Pages with status 200 actually deliver content

Check
For successfully served HTML pages, checks whether the intended initial or rendered HTML contains the promised content. Fails when it is empty.
Fix
Restore the content or return the appropriate status code for missing pages.
Google
Google may decline to index a page even with status 200. Because Google uses the rendered HTML, an initially empty JavaScript shell is not automatically unindexable.

rendering.meaningful-html-representationRevision 1

Outside Google Search

The main heading reads without repeats or gaps

Check
Examines headings built from repeated spans, responsive copies or aria-hidden parts. Fails when the extracted text repeats fragments or loses words the phrase needs.
Fix
Keep one semantic text version of the heading and make decorative copies unobtrusive without hiding needed words.
Google
Not a Google Search topic; this is about accessibility. Google's web developer guides recommend a meaningful heading structure and no aria-hidden on focusable elements.

headings.accessible-single-readingRevision 1

Outside Google Search

Icons in comparison tables have a machine-readable meaning

Check
Applies to comparison tables that show yes, no or other states as icons. Fails when the extracted text gives no state or the wrong one.
Fix
Add visible or accessible status text to each cell instead of an icon hidden with aria-hidden.
Google
This concerns accessibility, not Google Search. Google's web developer guides ask functional images to describe their purpose and every interactive element to have an accessible name.

rendering.icon-meaningRevision 1

Outside Google Search

No `document.write()` call blocks the parser

Check
Looks for inline scripts that run document.write() while the page is parsed. Fails when an avoidable blocking call is confirmed.
Fix
Build elements through the DOM API or load scripts without blocking instead of injecting them with document.write().
Google
A load-time matter outside Google Search. Google's Chrome documentation names document.write() that injects scripts as a known cause of poor performance.

rendering.no-parser-document-writeRevision 1

HTML markup 8

Backed by GoogleRuns daily

The `<head>` contains only valid elements

Check
Searches the source for elements that are not allowed in the <head>, such as an <h1>. Fails when such an element ends the metadata section early.
Fix
Move body content into the <body> and put metadata back where it takes effect inside the <head>.
Google
Google explicitly warns that after an invalid element in the <head>, it ignores all following elements. Checking the source fits, because the repaired DOM can hide the defect.

markup.head-content-validRevision 1changed

Partly backedRuns daily

`<noscript>` in the `<head>` holds only content allowed there

Check
Examines <noscript> elements in the <head>. Fails when they contain elements or text that the HTML specification does not allow in that position.
Fix
Move body fallbacks into the <body> and keep only permitted elements in the <noscript> of the <head>.
Google
Google explicitly lists <noscript> as a valid <head> element and requires valid head HTML. Which content is allowed inside it is defined by the HTML specification, not by Google.

markup.head-noscript-validRevision 1changed

Partly backedRuns daily

Every `<picture>` contains an `<img>` fallback

Check
Checks each <picture> element for a correctly placed, usable <img> child. Fails when it is missing.
Fix
Add an <img> with a src fallback inside every <picture>.
Google
Google recommends always giving a fallback URL through the src attribute when using <picture>. Validating the full child order goes beyond that and follows the HTML standard.

markup.picture-img-fallbackRevision 1changed

No Google statementRuns daily

The source has at most one `<head>` start tag

Check
Counts the explicit <head> start tags in the HTML source. Fails when there are two or more, for example from nested templates.
Fix
Merge duplicate <head> sections in the templates that produce them.
Google
Google documents which elements are valid in the <head> but does not address the number of <head> tags directly. The rule is a convention for clean markup.
Note
A document with no explicit <head> tag at all is valid, because HTML allows omitting it.

markup.head-singleRevision 1changed

Outside Google SearchRuns daily

The `<base>` element resolves relative URLs as intended

Check
In documents with <base href>, checks where relative references actually resolve. Fails when the result is invalid or unintended URLs.
Fix
Correct the href value of the <base> element or remove an unintended declaration.
Google
Not a Google Search topic; this is about correct URL resolution in HTML. Google requires links to resolve to requestable URLs but says nothing about the <base> element.

markup.base-url-usableRevision 1changed

Outside Google SearchRuns daily

The character encoding is declared correctly and consistently

Check
Checks the encoding in the Content-Type header and in <meta charset>. Fails when it is missing where needed, contradicts itself or causes text to decode wrongly.
Fix
Serve one correct encoding, normally UTF-8, and place <meta charset> within the first 1,024 bytes of the document.
Google
This concerns correct display, not Google Search. Google's web developer guides recommend the charset declaration as the first element in the <head>, ahead of the title.
Note
A correct charset in the HTTP header is enough; a missing <meta charset> is then not a fault.

markup.encoding-declaredRevision 1changed

Outside Google SearchRuns daily

Lists follow the HTML content model

Check
Checks how <ul>, <ol>, <menu>, <li>, <dl>, <dt> and <dd> are nested. Fails when a list item lacks a valid parent or a list holds children it may not contain.
Fix
Place list items inside valid list elements and remove children the list may not contain.
Google
This concerns accessibility and valid HTML, not Google Search. Per Google's Chrome documentation, lists should contain only <li> elements plus supporting <script> and <template> elements.

markup.list-structureRevision 1changed

Outside Google SearchRuns daily

The page renders in standards mode, not quirks mode

Check
Checks whether the browser renders the page in standards mode and the doctype supports it. Fails when a missing or outdated doctype triggers quirks mode.
Fix
Start every HTML document with <!DOCTYPE html>.
Google
A browser rendering matter outside Google Search. Google's web developer guides explain that the doctype selects standards mode and that browsers fall back to quirks mode without it.

markup.standards-modeRevision 1changed

Resources 5

Partly backedRuns daily

Resource redirects never loop

Check
Traces the redirect chain of every embedded resource. Fails when the chain leads back to a URL it has already visited.
Fix
Correct the server or CDN redirect rule that creates the loop.
Google
Google follows redirects only up to a limit and processes the final target; a real loop never reaches one. Hitting a redirect limit alone does not prove a loop.

resources.no-redirect-cyclesRevision 1changed

Partly backedRuns daily

Redirected resources end at a working file

Check
Follows the redirects of embedded resources such as images, scripts or PDFs. Fails when the chain ends in an error or unusable content.
Fix
Point to the resource's valid final URL or repair the redirect target.
Google
Google follows redirects and processes the content of the final target. A working file at the end fits that model but says nothing about indexing or ranking.

resources.redirect-destination-successRevision 1changed

No Google statementRuns daily

Linked PDFs stay within the set size budget

Check
Checks the file size of linked or loaded PDFs against the budget the site owner set. Fails when a PDF is larger.
Fix
Compress large PDFs or split them, keeping the quality they need.
Google
Google's documentation sets no general size budget for PDF downloads. The rule is a user experience policy, not an indexing limit.

resources.pdf-download-budgetRevision 1changed

Outside Google SearchRuns daily

Resources load without needless redirect chains

Check
Counts the redirects before an embedded resource arrives. Fails at two or more avoidable hops; a single harmless hop does not count.
Fix
Reference the stable final URL of the resource directly in the code.
Google
A load-time matter outside Google Search. Google's crawler documentation says Google follows redirects, within each crawler's limits, and processes the final target.

resources.no-multihop-redirectsRevision 1changed

Outside Google SearchRuns daily

HTTPS pages embed no resources over plain HTTP

Check
Looks for images, scripts, stylesheets and other resources that an HTTPS page references over unencrypted HTTP. Fails when such a reference exists without an intended exception.
Fix
Switch these references to working HTTPS URLs.
Google
This concerns security, not Google Search. Google's web developer guides describe such mixed content on HTTPS pages as a security risk.
Note
Modern browsers often block or upgrade such resources, so a reference does not prove that data traveled unencrypted.

security.no-insecure-subresource-referenceRevision 2changed

Have these rules put into practice on your site.

We’re starting with a few companies and opening up step by step. The first customers get founding terms. Cancel monthly, no minimum term.

What happens next

  1. 1

    Before launch

    We get in touch personally and check whether XEO fits your company. If the answer is no, we’ll tell you plainly.

  2. 2

    At launch

    You give us access to your website, Search Console and Analytics, using a short checklist.

  3. 3

    After that

    Reviewed changes go live continuously. Every Monday you see what moved.

We only use your details to contact you when XEO opens. No newsletter. A short email to contact@usexeo.com is enough to have your signup deleted. Privacy