JavaScript rendering · JavaScript content and links

Links added by JavaScript

The three links in the related tests list on this page are not in the raw HTML. A script adds them, so crawlers that do not render cannot follow them.

How this page is built

The related tests list below is empty in the raw HTML. A script adds three links to other JavaScript rendering tests. Those pages are also linked from the home page, so they can still be found without rendering.

Why it matters

Search engines find pages by following links. Google can follow links added by JavaScript, but only after rendering, which may come much later than the first crawl. Other search engines and many crawl tools never see them, so the pages they lead to may be found late or not at all.

Menus, related product lists and pagination are often built this way on JavaScript-heavy sites.

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. Crawl tools that render can list links found only in the rendered HTML.

How to fix it

Put important links in the HTML sent by the server, as ordinary <a href> elements. Scripts can still enhance them once the page has loaded.

Back to all tests