Skip to content
Nazmul Nikhil
Menu

Main Content Requires JavaScript Rendering (Ahrefs): Make Pages Readable for AI Crawlers

Ahrefs flags pages whose main content only appears after JavaScript runs. Most AI crawlers don't run JavaScript, so they see an empty page. Here's how to fix it.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 2 min read
Main Content Requires JavaScript Rendering (Ahrefs): Make Pages Readable for AI Crawlers
Photo: Mohammad Rahmani on Unsplash

In short

Ahrefs flags "Main content requires JavaScript rendering" when a page's main content is missing from the raw HTML and only appears after JavaScript runs. Ahrefs notes that most AI bots can't execute it. A large crawl study by Vercel and MERJ found that OpenAI's and Anthropic's crawlers fetch JavaScript files but don't run them. Serve the main content in the HTML itself, with server-side rendering or static generation.

Google has rendered JavaScript for years, so many sites built entirely in client-side React or Vue still rank. AI crawlers are different.

What AI crawlers see

A client-side app often sends HTML like this:

<body>
<div></div>
<script src="/assets/app.js"></script>
</body>

A browser runs the script and builds the page. A crawler that doesn't run JavaScript sees an empty div. The Vercel and MERJ study (December 2024) found no evidence that GPTBot, OAI-SearchBot, ChatGPT-User or ClaudeBot rendered JavaScript. It's one study, so confirm against your own server logs if this matters to you.

Check a page yourself

View the raw HTML (right-click > View Page Source, not DevTools Elements) and search for a sentence from the main content. If it isn't there, crawlers that don't render can't see it. From a terminal:

curl -s https://example.com/page/ | grep -c "a sentence from the page"

A result of 0 means the text isn't in the HTML.

How to fix it

Approach Good for
Static site generation (SSG) Content sites, blogs, service pages; builds HTML once at deploy
Server-side rendering (SSR) Pages that change per request
Prerendering service Older single-page apps you can't rebuild yet

Frameworks like Astro, Next.js (static export or SSR) and Nuxt make this straightforward. For a React and Vite site, a static-generation plugin or a move to Astro can output full HTML for every route.

WordPress, Shopify, Webflow and Wix: core pages are server-rendered already. The issue usually comes from widgets: reviews, product tabs, FAQs or pricing loaded by a script. Choose apps and plugins that output content in the HTML, or put key text directly on the page.

Common mistakes

  • Checking only in Google's URL Inspection tool, which renders JavaScript and so hides the problem.

  • Rendering the text but not the links. Crawlers also need plain <a href> links to find your other pages.

This guide isn't affiliated with or endorsed by Ahrefs.

Sources and references

TAGSAhrefs Site AuditJavascript rendering ai crawlersAi crawlers javascriptServer side rendering seo
Nazmul Nikhil

About the author

Nazmul Nikhil

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.

Need help with this?

Get it fixed with Technical SEO

I find the issues that cost you traffic and fix them, starting with the pages that matter most.

Keep reading

Related articles

All Site Audit Issues posts →

Get the next guide in your inbox

One email when a new SEO or AI search guide goes live.

Ready to grow?

Get a free audit of your website, or book a 30-minute call to talk through your goals.

Nazmul Hasan

Talk to Nazmul directly

Reply within 24h

WhatsApp +880 1682835118
nazmulnikhil@gmail.com