JS SEO có 4 loại lỗi phổ biến khiến Google không index được content — rendering, meta tags, links, và resources.
Lỗi rendering:
- Content trong useEffect/componentDidMount — Google có thể không chờ async data fetch
- Client-only routing (React Router) không có SSR fallback — Google thấy blank page
- Error boundaries catch lỗi nhưng render fallback UI — Google index error message thay vì content
Lỗi meta tags:
- Dynamic title/description set bằng JS — Google có thể lấy title trước khi JS chạy
- Thiếu canonical cho dynamic routes
Lỗi links:
- Navigation bằng onClick + router.push thay vì
<a href>— Google không follow JS click events - Infinite scroll không có pagination fallback
Lỗi resources:
- robots.txt block JS/CSS bundles — Google không render được trang
- Bundle quá lớn khiến Googlebot timeout (>5s)
Fix chung: dùng SSR/SSG, test bằng Google Search Console URL Inspection, dùng <Link> component cho navigation.
JS SEO has 4 common mistake categories that prevent Google from indexing content — rendering, meta tags, links, and resources.
Rendering issues:
- Content inside useEffect/componentDidMount — Google may not wait for async data fetching
- Client-only routing (React Router) without SSR fallback — Google sees a blank page
- Error boundaries catching errors and rendering fallback UI — Google indexes the error message instead of real content
Meta tag issues:
- Dynamic title/description set via JS — Google may capture the title before JS executes
- Missing canonicals for dynamic routes
Link issues:
- Navigation using onClick + router.push instead of
<a href>— Google does not follow JS click events - Infinite scroll without a pagination fallback
Resource issues:
- robots.txt blocking JS/CSS bundles — Google cannot render the page
- Oversized bundles causing Googlebot to time out (>5s)
General fixes: use SSR/SSG, test with Google Search Console URL Inspection, use a <Link> component for all navigation.