All service pages that were returning 403 errors on direct crawler access are now properly prerendered and deployed to the dist/ directory.
File: scripts/prerender-static.mjs (line 8)
Before:
const publicDir = path.resolve(projectRoot, 'public');After:
const publicDir = path.resolve(projectRoot, 'dist'); // Changed from 'public' - prerender to dist for Netlify deploymentImpact: All prerendered HTML now writes directly to dist/, which is the Netlify publish directory.
File: scripts/prerender-static.mjs (lines 1264-1266)
Added 3 new pages to prerender:
{ path: '/reviews', title: 'Customer Reviews & Testimonials' },
{ path: '/projects', title: 'Roofing Projects Gallery' },
{ path: '/our-location', title: 'Our Deerfield Beach Location' },File: scripts/seo-titles.json (lines 98-102)
Added:
"/our-location": {
"title": "Our Deerfield Beach Location | All Phase Construction USA",
"description": "Visit our roofing office at 590 Goolsby Blvd, Deerfield Beach, FL 33442. Serving Broward and Palm Beach Counties from our centrally located headquarters.",
"canonical": "https://allphaseconstructionfl.com/our-location"
}Changed all console.log statements to reflect dist/ instead of public/ for clarity during builds.
Total Pages: 159 prerendered HTML pages
Service Pages (16 total):
✅ /metal-roofing
✅ /commercial-roofing
✅ /flat-roofing
✅ /tile-roofing
✅ /shingle-roofing
✅ /residential-roofing
✅ /pricing-guide
✅ /reviews ← NEW
✅ /projects ← NEW
✅ /our-location ← NEW
✅ /easy-payments
✅ /roof-maintenance-programs
✅ /roof-replacement-process
✅ /roof-inspection
✅ /roof-repair
✅ /blog
All previously failing pages now exist in dist/ with proper SEO metadata:
✅ /metal-roofing - Metal Roofing Installation & Repair | All Phase Construction USA
✅ /commercial-roofing - Commercial Roofing Services | All Phase Construction USA
✅ /flat-roofing - Flat Roofing Services | All Phase Construction USA
✅ /tile-roofing - Tile Roofing Installation & Repair | All Phase Construction USA
✅ /shingle-roofing - Shingle Roofing Installation & Repair | All Phase Construction USA
✅ /residential-roofing - Residential Roofing Services | All Phase Construction USA
✅ /pricing-guide - Roof Cost Calculator | All Phase Construction USA
✅ /reviews - Customer Reviews | All Phase Construction USA
✅ /projects - Our Projects | All Phase Construction USA
✅ /easy-payments - Easy Payments & Financing Options | All Phase Construction USA
✅ /roof-maintenance-programs - Roof Maintenance Programs | All Phase Construction USA
✅ /roof-replacement-process - Roof Replacement Process | All Phase Construction USA
✅ /our-location - Our Deerfield Beach Location | All Phase Construction USA1. Crawler: GET /metal-roofing
2. Netlify: Look for /metal-roofing/index.html in dist/
3. File: NOT FOUND (was in public/, not deployed)
4. Fallback: Serve /index.html (empty React shell)
5. Result: 403 error or no indexable content
1. Crawler: GET /metal-roofing
2. Netlify: Look for /metal-roofing/index.html in dist/
3. File: FOUND (prerendered HTML with SEO metadata)
4. Response: 200 OK with full HTML content
5. Result: ✅ Crawler indexes properly
dist/
├── index.html ← Homepage
├── metal-roofing/index.html ← Service pages
├── commercial-roofing/index.html
├── flat-roofing/index.html
├── tile-roofing/index.html
├── shingle-roofing/index.html
├── residential-roofing/index.html
├── pricing-guide/index.html
├── reviews/index.html ← NEW
├── projects/index.html ← NEW
├── our-location/index.html ← NEW
├── easy-payments/index.html
├── roof-maintenance-programs/index.html
├── roof-replacement-process/index.html
├── roof-inspection/index.html
├── roof-repair/index.html
├── blog/index.html
├── locations/
│ ├── boca-raton/index.html ← 49 city pages
│ ├── fort-lauderdale/index.html
│ └── ...
├── roof-repair/
│ ├── boca-raton/index.html ← 49 repair pages
│ └── ...
└── roof-inspection/
├── boca-raton/index.html ← 49 inspection pages
└── ...
After deployment, verify with:
# Test direct access
curl -I https://allphaseconstructionfl.com/metal-roofing
# Should return: HTTP/2 200
# Test crawler access
curl -A "Googlebot/2.1" https://allphaseconstructionfl.com/metal-roofing
# Should return: Full HTML with <title> and content
# Test in Screaming Frog
# Should return: 200 OK for all service pages- Google Search Console: Request re-indexing of affected URLs
- Bing Webmaster Tools: Submit URLs for re-crawl
- Sitemap: Verify all URLs in sitemap.xml are accessible
Root Cause: Prerendered HTML was written to public/ but Netlify deployed dist/, so crawler-accessible HTML was missing.
Solution: Changed prerender script to write to dist/ instead of public/.
Result: All 16 service pages now have prerendered HTML with full SEO metadata in the deployed directory.
Status: ✅ FIXED - All pages ready for crawler access on next deployment.