How Nercal Works

    A technical overview of bot routing, prerendering, and automatic SEO injection — and why SPAs need it.

    The Problem: SPAs Are Invisible to Crawlers

    Single-page applications built with React, Vue, or similar frameworks ship an almost empty HTML file — typically just a <div id="root"></div> and a JavaScript bundle. The actual content only appears after the browser executes that JavaScript.

    This is fine for human visitors with modern browsers. But search engine crawlers and AI assistants handle JavaScript very differently:

    • Googlebot can render JavaScript, but it queues pages and processes them later. The delay can range from hours to weeks, and rendering is not always reliable.
    • Bingbot has limited JavaScript rendering capabilities and often indexes the empty shell instead of the actual content.
    • AI crawlers like GPTBot, ClaudeBot, and PerplexityBot generally do not execute JavaScript at all. They see an empty page.

    The result: your app is live and working for users, but search engines and AI assistants cannot read it. No indexing. No citations. No recommendations.

    How Nercal Solves It

    Nercal sits between your app and every crawler that visits it. The system has three layers that work together to make your SPA fully readable without changing your source code.

    1. Bot Routing at the Edge

    A Cloudflare Worker inspects every incoming request. It checks the User-Agent header against a list of approximately 15 known crawlers — including Googlebot, Bingbot, GPTBot, ClaudeBot, PerplexityBot, Twitterbot, and others.

    • Human visitors receive your original SPA — the normal JavaScript bundle, fast and interactive.
    • Bots and crawlers are routed to a prerendered HTML version of the same page, containing the full content they need to index or cite.

    This happens at the edge with near-zero latency. Your users never notice a difference.

    2. Prerendering Pipeline

    Nercal runs a headless browser service (Puppeteer on Fly.io) that loads every route of your app, waits for JavaScript to finish rendering, and captures the resulting HTML.

    • The rendered HTML is cached with a 24-hour TTL.
    • When you push a new commit and publish, the cache is automatically refreshed for all routes.
    • If a bot requests a route that is not yet cached, it triggers an on-demand render so no request goes unanswered.

    The prerendered output is clean, static HTML — exactly what crawlers expect. No JavaScript execution required on their end.

    3. Automatic SEO Injection

    During prerendering, Nercal analyzes each page and automatically injects technical SEO elements that most SPAs lack. This happens in the prerendered output only — your source code is never modified.

    • Meta tags — title, description, viewport, and Open Graph tags per page.
    • JSON-LD structured data — WebSite schema with SearchAction, BreadcrumbList based on route paths, and FAQPage detection for accordion-style content.
    • Sitemap and robots.txt — generated and kept in sync with your detected routes.
    • Canonical URLs — preventing duplicate content issues.

    The Deployment Flow

    Every time you push code to your connected GitHub repository, Nercal follows a deterministic pipeline:

    1. Push detected — a webhook records the new commit SHA as pending.
    2. Publish triggered — you click Publish (or auto-publish fires). A GitHub Action builds the app on a mirror repository and uploads static assets to Cloudflare R2.
    3. Activation — the new commit SHA is promoted to active. The Cloudflare Worker is updated to serve the new assets, the edge cache is purged, and the prerender cache is refreshed.
    4. Prerender refresh — every detected route is re-rendered through the headless browser, replacing stale cached HTML.

    The entire process runs automatically. You push code, click publish, and the updated site — fully indexable — is live within minutes.

    Bot Analytics

    Nercal logs every bot visit, including which crawler visited, which route it accessed, and when. This gives you visibility into how often Googlebot, AI assistants, and social media scrapers are actually reading your site.

    Most SPA developers have no idea whether crawlers visit their site at all. With Nercal, you see it in real time.

    Staging Protection

    As a safeguard, the Cloudflare Worker automatically injects an X-Robots-Tag: noindex header for all requests to dev.* subdomains. This ensures staging environments are never accidentally indexed by search engines.

    What Makes This Different

    Traditional approaches to SPA indexability require rewriting your app with server-side rendering (SSR) or migrating to a framework like Next.js. Nercal requires none of that.

    • No migration required — works with your existing React, Vite, or SPA stack.
    • No code changes — injection happens at the infrastructure level.
    • AI visibility — not just search engines, but AI assistants like ChatGPT, Claude, and Perplexity can read and cite your content.
    • Managed hosting — SSL, CDN, domains, and deployments are included. One platform, not five.

    Summary

    Nercal is visibility infrastructure for SPAs. It detects bots at the edge, serves them prerendered HTML, and automatically injects structured data — all without touching your source code. The result is a site that search engines can index and AI assistants can cite, deployed and updated with a single click.