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.