CRITICAL ISSUE: The canonical tag system is broken for ALL roof-repair pages (and likely other dynamic routes). Pages are incorrectly getting the homepage canonical https://allphaseconstructionfl.com/ instead of their own URLs.
The bug exists in seoTitles.ts:236-240 in the generateSEOMetadata() function:
// Fallback - ONLY for unmatched routes (not location pages)
return {
title: 'Roofing Contractor — All Phase Construction USA...',
description: 'All Phase Construction USA provides...',
canonical: `https://allphaseconstructionfl.com${path}` // ❌ BUG HERE
};- Roof-repair pages like
/roof-repair/boca-ratonare NOT defined in theSEO_TITLESstatic map (lines 28-119) - They don't match the
/locations/pattern check (line 200) - They don't match the
/blog/pattern check (line 225) - They fall through to the fallback (line 236)
- The fallback uses the INCOMING
pathparameter — but when NuclearMetadata.tsx calls this function, it's already passing the homepage URL as the canonical!
- NuclearMetadata.tsx line 30:
const metadata = generateSEOMetadata(path); - generateSEOMetadata() doesn't find the path in any pattern
- Falls through to fallback at line 236
- BUT: The individual page components (like
BocaRatonRoofRepairPage.tsx) use the<SEO>component which is DEPRECATED - SEO.tsx line 16:
/** @deprecated Canonical is now managed solely by NuclearMetadata. This prop is ignored. */ - NuclearMetadata owns canonical but has NO definition for roof-repair pages
Based on App.tsx routes and missing SEO_TITLES entries:
- /roof-repair/boca-raton ❌
- /roof-repair/boynton-beach ❌
- /roof-repair/broward-county ❌
- /roof-repair/coconut-creek ❌
- /roof-repair/cooper-city ❌
- /roof-repair/coral-springs ❌
- /roof-repair/dania-beach ❌
- /roof-repair/davie ❌
- /roof-repair/deerfield-beach ❌
- /roof-repair/delray-beach ❌
- /roof-repair/greenacres ❌
- /roof-repair/hallandale-beach ❌
- /roof-repair/haverhill ❌
- /roof-repair/highland-beach ❌
- /roof-repair/hollywood ❌
- /roof-repair/hypoluxo ❌
- /roof-repair/lake-park ❌
- /roof-repair/lake-worth ❌
- /roof-repair/lantana ❌
- /roof-repair/lighthouse-point ❌
- /roof-repair/palm-beach ❌
- /roof-repair/palm-beach-county ❌
- /roof-repair/palm-beach-county-unincorporated ❌
- /roof-repair/parkland ❌
- /roof-repair/pompano-beach ❌
- /roof-repair/sunrise ❌
- /roof-repair/wellington ❌
- /roof-repair/west-palm-beach ❌
- /roof-repair/wilton-manors ❌
- /locations/boca-raton/calculator ❌
- /locations/boynton-beach/calculator ❌
- /locations/coconut-creek/calculator ❌
- /locations/coral-springs/calculator ❌
- (and 30+ more calculator pages)
- /locations/boca-raton/top-5-roofer ❌
- /locations/boynton-beach/top-5-roofer ❌
- /locations/coconut-creek/top-5-roofer ❌
- /locations/coral-springs/top-5-roofer ❌
- /locations/deerfield-beach/top-5-roofer ❌
- /locations/fort-lauderdale/top-5-roofer ❌
- /locations/west-palm-beach/top-5-roofer ❌
- /roof-repair (hub page) ❌
- All /roof-inspection/:city pages ❌
- Most service-specific inspection pages ❌
Only pages explicitly defined in SEO_TITLES (lines 28-119):
- / ✅
- /contact ✅
- /about-us ✅
- /roof-cost-calculator ✅
- /blog ✅
- /reviews ✅
- /projects ✅
- /residential-roofing ✅
- /commercial-roofing ✅
- /roof-inspection ✅
- /roof-replacement-process ✅
- /tile-roofing ✅
- /metal-roofing ✅
- /shingle-roofing ✅
- /flat-roofing ✅
- /locations/deerfield-beach/how-to-hire-a-roofing-contractor ✅
Plus:
- /locations/:slug pages (uses buildLocationSeo) ✅
- /blog/:slug pages (has pattern match) ✅
Bing Webmaster Tools saw:
<!-- On /roof-repair/boca-raton/ -->
<link rel="canonical" href="https://allphaseconstructionfl.com/" />
<!-- ❌ Wrong! Should be https://allphaseconstructionfl.com/roof-repair/boca-raton -->This creates:
- Duplicate content signals - Multiple pages claiming to be the homepage
- Indexing confusion - Bing doesn't know which page to index
- Ranking dilution - Link equity flows to wrong URL
- Crawl budget waste - Bing thinks it's seeing duplicate content
Add pattern matches in generateSEOMetadata() for:
/roof-repair/:city→ canonical:https://allphaseconstructionfl.com/roof-repair/${city}/roof-inspection/:city→ canonical:https://allphaseconstructionfl.com/roof-inspection/${city}/locations/:city/calculator→ canonical:https://allphaseconstructionfl.com/locations/${city}/calculator
Change line 239 to always construct from the current path:
canonical: `https://allphaseconstructionfl.com${normalizedPath}`Manually add all 100+ pages to the static map (NOT recommended - maintenance nightmare)
Affected Pages: ~100-150 pages SEO Impact: SEVERE - These pages cannot be indexed by Bing Google Impact: Likely affected too (check GSC) Traffic Loss: All organic traffic to these pages is at risk
- Choose fix option (I recommend Option 1)
- Implement pattern matching in
seoTitles.ts - Test locally with curl
- Deploy fix
- Submit corrected URLs to Bing Webmaster Tools
- Monitor indexing status
/tmp/cc-agent/61908077/project/src/config/seoTitles.ts(lines 191-241)- Possibly add pattern matching around line 225-230
Report Generated: $(date)
Total Pages Analyzed: ~200
Pages with Canonical Issues: ~100-150 (50-75%)
Critical Priority: YES