Free for 4 days: connect your Google Business Profile and get every Pro feature. No payment needed.
Chamko AI
Websites & tools

JavaScript SEO for React and Next.js Business Websites: A Practical Crawlability

Make React and Next.js websites search-friendly with server rendering,

By Chamko Research Team Updated 7 min read

Quick answer

A web agency builds a polished React website for a local home-services company. The homepage looks complete in Chrome, but the initial HTML response contains little more than an empty application container.

A web agency builds a polished React website for a local home-services company. The homepage looks complete in Chrome, but the initial HTML response contains little more than an empty application container. Service descriptions, page titles and internal links appear only after JavaScript runs. Google can render JavaScript, but relying on rendering for every critical detail introduces additional complexity and potential delays.

JavaScript SEO is not a demand to avoid modern frameworks. It is the discipline of making important page content, navigation and metadata available in a way search engines can process reliably.

1. Understand Google's processing stages

Google describes JavaScript processing in three broad phases: crawling, rendering and indexing. Googlebot first fetches the URL and parses the response. Pages that qualify may be placed in a rendering queue, where a headless Chromium environment executes JavaScript. Google then processes the rendered HTML for indexing and link discovery.

This process means that a page can be technically accessible but still have implementation problems. Rendering may happen later than the initial crawl, scripts can fail, and resources may be blocked. A business should not assume that a successful browser preview proves that all important information is available to Google.

2. Decide what must be in the initial response

For a local business website, critical content includes:

  • The page's main heading and service explanation.
  • The business or branch identity.
  • The canonical URL.
  • The title and meta description.
  • Internal links to important service and location pages.
  • Structured data where relevant.
  • A meaningful HTTP status code.

Server-side rendering or static generation can make this information available in the initial HTML. Next.js supports several rendering approaches, and the right choice depends on whether the page is static, frequently updated or personalised.

A service page describing “commercial pest control in Surat” rarely needs to wait for a browser-side API call to display its core text. If the content is stable, static generation or server rendering may simplify crawling and improve initial usability.

Google generally discovers links through standard anchor elements with an href attribute. A clickable div with an onClick handler is not equivalent to a crawlable link.

Good:

<a href="/services/ac-repair/">AC repair</a>

Risky:

<div onclick="navigateTo('/services/ac-repair/')">AC repair</div>

React components should render semantic anchors for navigation. A client-side router can still intercept clicks for a smooth user experience, but the underlying HTML should contain a real destination URL.

Check menus, service cards, footer links, breadcrumbs and pagination controls. A site can have a beautiful navigation drawer and still leave important pages difficult to discover if the links are only event handlers.

4. Handle metadata and canonical URLs per page

A common single-page application mistake is rendering the same title and description across every route. Each indexable service or location page should have metadata that accurately describes its own content.

For Next.js, use the framework's supported metadata mechanisms and ensure that the rendered page emits the intended title, description, canonical and social metadata. Do not rely on a browser-side script that changes the title after a user navigates if the initial response remains generic.

Canonical URLs should use the preferred HTTPS host and consistent path format. If the site supports both trailing-slash and non-trailing-slash versions, redirect or canonicalise them deliberately. Avoid generating multiple canonical values through both a shared layout and a page-specific component.

5. Return the right HTTP status

A React router may show a “Page not found” message while the server still returns HTTP 200. This is a soft 404 pattern. The page looks like an error to a human, but the response does not communicate a missing resource correctly.

Ensure that:

  • Existing pages return a successful status.
  • Truly missing URLs return 404 or an appropriate status.
  • Permanently moved pages use a suitable redirect.
  • Temporarily unavailable pages do not masquerade as normal content.
  • Server and client routing agree about which routes exist.

For Next.js, use the framework's not-found and redirect handling correctly. Test the actual network response, not only the text displayed in the browser.

6. Avoid hiding content behind user interaction

Google's JavaScript documentation explains that Googlebot generally does not interact with pages like a human user. Do not make the main service description, product list or internal links appear only after a click, hover or scroll event.

A tabbed interface can be acceptable if all meaningful content is present in rendered HTML or can be discovered through crawlable links. A “load more” button should not be the only way to discover the next set of important products; use crawlable URL patterns where appropriate.

For a clinic, the list of treatments and practitioner information should not be inaccessible until a visitor opens several client-side accordions if those details are central to the page.

7. Test rendered output rather than guessing

Use Search Console URL Inspection to inspect the indexed result and run a live test when needed. Review the rendered HTML and screenshot where available. Compare the browser page with the server response and identify missing content or resources.

A developer's QA checklist should include:

  1. Open the URL with JavaScript enabled.
  2. Inspect the initial HTML response.
  3. Confirm page title and canonical.
  4. Check the rendered HTML for main content.
  5. Confirm internal links have href values.
  6. Check image URLs and important assets.
  7. Test the route with a direct request, not only client-side navigation.
  8. Confirm the HTTP status code.
  9. Inspect console errors and blocked resources.

Do not use “view source” as the only test for a site that legitimately renders content dynamically. Use both initial response and rendered output to understand the full process.

8. Common implementation problems

Empty app shell. The initial HTML contains no meaningful content and the page depends entirely on rendering. Consider static generation or server rendering for important public pages.

Metadata copied across routes. Generate unique titles, descriptions and canonicals for each page.

JavaScript-only links. Render normal anchors with href attributes.

Soft 404 routes. Return real HTTP status codes for missing pages.

Blocked scripts or APIs. Check robots rules, firewall access and failed network requests.

Content loaded only after scrolling. Ensure essential information is available without requiring Googlebot to simulate user gestures.

9. Measure technical health after deployment

Track important URL groups, index coverage, crawl errors, server response codes, JavaScript exceptions and organic impressions. When migrating from client-only rendering to server rendering, compare a sample of URLs before and after release.

Do not infer that a page has become indexed simply because the rendered HTML now looks correct. Allow for recrawling and evaluate Search Console data over time. Also test the actual customer experience: a server-rendered page that is crawlable but has broken booking interactions is not a successful release.

Frequently asked questions

Can Google index React websites?

Yes. Google Search can process JavaScript, but the site still needs to make important content and links discoverable and avoid rendering failures.

Is server-side rendering mandatory for SEO?

No. It is one approach. Static generation, server rendering and client rendering can all be used, but important content should be reliably available to crawlers and users.

Does Next.js automatically make a website SEO-friendly?

No. A framework provides capabilities, not a guarantee. Metadata, status codes, internal links, rendering strategy and content still need correct implementation.

Google generally relies on anchor elements with an href attribute. Use semantic links rather than a clickable element with no destination URL.

Why does a missing route return 200?

The application may render an error message without returning a proper HTTP 404 response. Configure server and framework routing to return the correct status.

Should I put all content in the initial HTML?

For critical public information, making it available in the initial response is a robust approach. Some dynamic content is acceptable, but do not hide essential text and links behind interactions.

How can I test JavaScript SEO?

Use Search Console URL Inspection, inspect initial and rendered HTML, check the page screenshot, verify crawlable links and test HTTP status codes.

Conclusion: build pages that work before relying on browser-side execution

React and Next.js can support search-friendly business websites when the implementation handles rendering, metadata, links and status codes deliberately. Treat each route as a public document that must work through a direct request, not merely as a screen reached through in-app navigation.

Chamko Marketing helps businesses manage their Google Business Profiles through marketing and optimization features. Framework-level rendering and technical SEO should remain part of the website development workflow, while profile information is maintained as a separate customer-facing asset.

References

Keep reading