All SEO elements (canonical URLs, sitemap, robots.txt) now use a single, consistent domain format.
https://allphaseconstructionfl.com
Note: No www subdomain
File: src/components/CanonicalManager.tsx
const origin = "https://allphaseconstructionfl.com";
const pathname = location.pathname || "/";
// Root path includes trailing slash
const canonicalUrl = pathname === "/"
? `${origin}/`
: `${origin}${pathname}`;| Route Path | Canonical URL |
|---|---|
/ |
https://allphaseconstructionfl.com/ |
/residential-roofing |
https://allphaseconstructionfl.com/residential-roofing |
/contact |
https://allphaseconstructionfl.com/contact |
/roofing-contractor-boca-raton-fl |
https://allphaseconstructionfl.com/roofing-contractor-boca-raton-fl |
✅ Root path (/): Has trailing slash
✅ All other paths: No trailing slash
✅ Consistent: Matches sitemap.xml exactly
File: public/robots.txt
# Allow all crawlers
User-agent: *
Allow: /
# Allow specific crawlers
User-agent: Googlebot
Allow: /
User-agent: Bingbot
Allow: /
User-agent: Slurp
Allow: /
# Disallow admin pages
User-agent: *
Disallow: /admin
# Sitemap location
Sitemap: https://allphaseconstructionfl.com/sitemap.xml✅ Allows all search engines
✅ Blocks /admin path (not in sitemap)
✅ References canonical sitemap URL
✅ No www subdomain in sitemap reference
| Element | Domain |
|---|---|
| Canonical URLs | https://allphaseconstructionfl.com |
| Sitemap XML | https://allphaseconstructionfl.com |
| Robots.txt Sitemap | https://allphaseconstructionfl.com |
✅ All elements use the same domain (no www)
Sample verification showing canonical URLs match sitemap:
# Sitemap URLs
https://allphaseconstructionfl.com/
https://allphaseconstructionfl.com/residential-roofing
https://allphaseconstructionfl.com/commercial-roofing
# Canonical URLs (generated by CanonicalManager)
https://allphaseconstructionfl.com/
https://allphaseconstructionfl.com/residential-roofing
https://allphaseconstructionfl.com/commercial-roofing✅ Perfect match - No discrepancies
- No www/non-www Conflicts: Single domain format prevents duplicate content issues
- Consistent Canonicals: Search engines see clear, consistent signals
- Proper Sitemap Reference: Robots.txt points to the correct sitemap URL
- Trailing Slash Consistency: Predictable URL structure throughout site
- Single Source of Truth: All SEO elements derive from
sheetSitemap.ts
- src/components/CanonicalManager.tsx
- Changed domain from
https://www.allphaseconstructionfl.comtohttps://allphaseconstructionfl.com - Removed
wwwsubdomain - Maintains trailing slash logic (root only)
- Changed domain from
-
public/robots.txt
- Already using correct domain (no changes needed)
- Sitemap reference correct:
https://allphaseconstructionfl.com/sitemap.xml
-
public/sitemap.xml
- Already using correct domain
- All 64 URLs use
https://allphaseconstructionfl.com
✅ Build completes successfully ✅ Canonical URLs use correct domain (no www) ✅ Root path has trailing slash ✅ Other paths have no trailing slash ✅ Robots.txt references correct sitemap URL ✅ Sitemap URLs match canonical URL format ✅ No visual or behavioral changes to site
src/components/CanonicalManager.tsx- Canonical URL generationpublic/robots.txt- Search engine directivespublic/sitemap.xml- Generated from sheetSitemap.tssrc/data/sheetSitemap.ts- Single source of truth for all URLs