Prompt
How do I diagnose JavaScript SEO problems?
Latest observation
To diagnose JavaScript SEO problems, think in terms of what search engines can actually fetch, render, and understand versus what users see in the browser.
Here’s a practical workflow.
1) Check if the content is present in raw HTML
Search engines may not reliably wait for or execute all client-side JavaScript.
- Open the page source (
view-source:or “View Page Source”). - Compare it with the rendered DOM in DevTools.
- Ask: Is the important content already in the initial HTML?
If critical text, links, titles, meta tags, or structured data only appear after JS runs, that’s a risk.
2) Test with JavaScript disabled
See what a crawler might get before rendering.
Ways to test:
- Disable JavaScript in Chrome DevTools.
- Use a text-only or “NoScript” browser.
- Fetch the page with a simple HTTP client and inspect HTML.
If the page becomes blank or key content disappears, search engines may struggle with it.
3) Use Google Search Console tools
For Google specifically:
- URL Inspection
- Check if Google can crawl and render the page.
- Compare “Crawled page” and rendered HTML/screenshot.
- Page indexing report
- Look for “Crawled - currently not indexed,” “Duplicate,” or rendering-related issues.
- View tested page
- See if Googlebot rendered the page as intended.
4) Inspect rendered HTML, not just the browser view
Use tools that show the post-rendered DOM:
- Chrome DevTools Elements panel
- Screaming Frog with JavaScript rendering enabled
- Sitebulb
- WebPageTest or similar rendering tools
Check whether:
- Main content is in the DOM
- Internal links are present
- Canonical tags are correct
- Meta robots tags are correct
- Structured data is output
5) Verify important SEO elements are server-side or reliably rendered
These should not depend on fragile client-side timing:
<title><meta name="description">- canonical tags
- robots meta
- hreflang
- structured data JSON-LD
- primary navigation links
- pagination links
- image alt text if important for context
If any of these are injected late or inconsistently, search engines may miss them.
6) Look for hydration or rendering bugs
Common JS SEO issues come from:
- Content not loading due to API failures
- Infinite loading states
- Hydration mismatches
- Route changes not updating meta tags
- Broken lazy loading
- Client-side redirects
- Links implemented as buttons or JS-only actions
Check browser console and network requests for errors.
7) Confirm crawlability of resources
Google needs access to JS, CSS, images, and APIs.
Make sure:
robots.txtdoes not block key JS/CSS files- API endpoints needed for content are accessible
- No authentication blocks the crawler
- No CORS or bot-detection issues prevent rendering
8) Check internal linking and routing
If your app is an SPA, verify:
- Real, crawlable
<a href>links exist - URLs are unique and stable
- History API routing works on direct load
- Server returns correct status codes for each route
If all navigation is JS-driven with no proper links, discovery can suffer.
9) Compare user vs crawler output
A useful test is to compare:
- What a normal browser sees
- What Googlebot sees
- What the initial HTML contains
Look for differences in:
- Main content
- Titles/descriptions
- Canonicals
- Indexing directives
- Structured data
- Links
10) Use logs and analytics
Server logs can reveal:
- Whether bots are requesting pages
- Whether they fetch JS assets
- Whether they hit errors, redirects, or timeouts
Analytics can help spot pages with:
- High impressions but low clicks
- Poor indexing
- Unexpected crawl patterns
Common signs of JavaScript SEO problems
- Pages are indexed but show wrong titles/descriptions
- Important content is missing in search snippets
- Google indexes thin or empty pages
- Internal links aren’t discovered
- Structured data is missing in Google’s view
- Pages take too long to render or never complete
- Mobile/desktop render differs unexpectedly
Quick troubleshooting checklist
For a problematic page, ask:
- Is the content in the initial HTML?
- Does it render correctly with JS disabled?
- Does Google Search Console show the rendered page correctly?
- Are title/meta/canonical/structured data present in rendered HTML?
- Are there console or network errors?
- Are essential JS/CSS files blocked?
- Are internal links actual links?
- Does the page return the right status code and content on direct load?
If you want, I can also give you a step-by-step debugging checklist for a React/Vue/Next.js site or a tool-by-tool workflow using Google Search Console and Screaming Frog.