Introduction

A site migration can leave canonical URLs pointing to the old domain, wrong protocol, or duplicate host variant even when pages otherwise load correctly. That creates indexing confusion, weakens consolidation signals, and can make the new site look partially duplicated. The fix is to trace where canonical URLs are generated and make sure every layer now agrees on the live public address.

Symptoms

  • Pages on the new site still declare canonicals for the old domain or staging URL
  • HTTPS pages generate canonicals with HTTP, or www and non-www variants conflict
  • Search engines keep surfacing the old hostname after migration
  • Canonicals differ between templates, page types, or environments
  • The issue appeared immediately after moving domains, platforms, or reverse proxies

Common Causes

  • The application still uses old base URL settings after the migration
  • Reverse proxy or forwarded host handling makes the app think it is serving a different public URL
  • Hardcoded canonical logic survived from the previous domain or staging environment
  • Redirects and canonical generation disagree about the preferred hostname or protocol
  • Cached metadata or static builds preserved old canonical values after cutover

Step-by-Step Fix

  1. Inspect the live HTML of affected pages and note exactly which canonical URL is being emitted.
  2. Identify where canonical URLs are generated in the application, CMS, or shared metadata layer.
  3. Check the configured base site URL, preferred hostname, and protocol settings after the migration.
  4. Verify reverse proxy and forwarded host behavior so the app receives the real public host and scheme.
  5. Remove hardcoded staging or old-domain canonical values left in templates, SEO plugins, or environment variables.
  6. Align redirects with the same preferred hostname and protocol used by the canonical tags.
  7. Clear caches or rebuild any statically generated pages still serving old metadata.
  8. Re-test multiple page types and confirm the canonical now points consistently to the intended live URL.
  9. Keep migration checklists tied to metadata validation so canonical drift is caught during future domain moves.