SSR (Server-Side Rendering) is causing Netlify function calls on every request, especially from web crawlers. This consumes credits and costs money.
- ✅
generateStaticParams()exists in main pages (good foundation) - ❌ No
output: 'export'innext.config.js - ❌ No
robots.txtto control crawlers - ❌ No cache headers configured
- ❌ No
dynamicParams = falseto prevent fallback SSR
- Add
output: 'export'tonext.config.js - Add
dynamicParams = falseto pages to prevent SSR fallback - Remove/adjust any dynamic features incompatible with static export
- Create
public/robots.txtwith crawl-delay and rate limiting
- Add cache headers in
next.config.jsfor static assets
- Build locally to ensure static export works
- Check
.next/orout/folder for static HTML files
| Task | Status | Notes |
|---|---|---|
| Static export config | ✅ Done | output: 'export' added |
| dynamicParams = false | ✅ Done | Both pages updated |
| robots.txt | ✅ Done | Blocks AI crawlers, 10s delay |
| Netlify _redirects | ✅ Done | Moved from next.config.js |
| Local build test | ✅ Done | 196 static pages, no warnings |
✓ Generating static pages (196/196)
○ (Static) prerendered as static content
● (SSG) prerendered as static HTML
→ Output folder: /out/
→ _redirects: ✓
→ robots.txt: ✓
- Low Risk: Adding robots.txt
- Low Risk: Static export - NO API routes, NO dynamic features found ✅
✅ No API routes (/app/api/)
✅ No cookies/headers/searchParams usage
✅ generateStaticParams() already in place
✅ Simple static content site
→ IDEAL CANDIDATE FOR FULL STATIC EXPORT
Review this plan✅Implement fixes✅Test build locally✅- Deploy to Netlify ← YOU ARE HERE
next.config.js- Added static exportapp/[[...category]]/page.tsx- Added dynamicParams = falseapp/docs/[slug]/page.tsx- Added dynamicParams = falsepublic/robots.txt- NEW (crawler control)public/_redirects- NEW (Netlify redirects)