Skip to content

Latest commit

 

History

History
178 lines (143 loc) · 5.99 KB

File metadata and controls

178 lines (143 loc) · 5.99 KB

CANONICAL TAG BUG REPORT

EXECUTIVE SUMMARY

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.

ROOT CAUSE IDENTIFIED

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
};

The Problem:

  1. Roof-repair pages like /roof-repair/boca-raton are NOT defined in the SEO_TITLES static map (lines 28-119)
  2. They don't match the /locations/ pattern check (line 200)
  3. They don't match the /blog/ pattern check (line 225)
  4. They fall through to the fallback (line 236)
  5. The fallback uses the INCOMING path parameter — but when NuclearMetadata.tsx calls this function, it's already passing the homepage URL as the canonical!

HOW IT HAPPENS

Call Chain:

  1. NuclearMetadata.tsx line 30: const metadata = generateSEOMetadata(path);
  2. generateSEOMetadata() doesn't find the path in any pattern
  3. Falls through to fallback at line 236
  4. BUT: The individual page components (like BocaRatonRoofRepairPage.tsx) use the <SEO> component which is DEPRECATED
  5. SEO.tsx line 16: /** @deprecated Canonical is now managed solely by NuclearMetadata. This prop is ignored. */
  6. NuclearMetadata owns canonical but has NO definition for roof-repair pages

CONFIRMED BROKEN PAGES

Based on App.tsx routes and missing SEO_TITLES entries:

Roof Repair Pages (ALL BROKEN):

  • /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 ❌

City Calculator Pages (ALL BROKEN):

  • /locations/boca-raton/calculator ❌
  • /locations/boynton-beach/calculator ❌
  • /locations/coconut-creek/calculator ❌
  • /locations/coral-springs/calculator ❌
  • (and 30+ more calculator pages)

City Top-Roofer Pages (ALL BROKEN):

  • /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 ❌

Other Broken Pages:

  • /roof-repair (hub page) ❌
  • All /roof-inspection/:city pages ❌
  • Most service-specific inspection pages ❌

PAGES THAT ARE WORKING

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) ✅

WHY BING REJECTED THESE PAGES

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:

  1. Duplicate content signals - Multiple pages claiming to be the homepage
  2. Indexing confusion - Bing doesn't know which page to index
  3. Ranking dilution - Link equity flows to wrong URL
  4. Crawl budget waste - Bing thinks it's seeing duplicate content

THE FIX (3 OPTIONS)

Option 1: Add Pattern Matching (RECOMMENDED)

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

Option 2: Fix Fallback Logic

Change line 239 to always construct from the current path:

canonical: `https://allphaseconstructionfl.com${normalizedPath}`

Option 3: Add All Pages to SEO_TITLES

Manually add all 100+ pages to the static map (NOT recommended - maintenance nightmare)

IMPACT ASSESSMENT

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

NEXT STEPS

  1. Choose fix option (I recommend Option 1)
  2. Implement pattern matching in seoTitles.ts
  3. Test locally with curl
  4. Deploy fix
  5. Submit corrected URLs to Bing Webmaster Tools
  6. Monitor indexing status

FILES TO MODIFY

  • /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 ⚠️