Switching domain names for a live WooCommerce store is one of the most critical operations in modern e-commerce engineering. In October 2026, an alarming case surfaced on the Google Search Central discussion channels and Search Engine Roundtable: four months after implementing complete HTTP 301 redirects and completing the Change of Address procedure in Google Search Console, the search engine suddenly began moving organic rankings and indexation back to the old domain.
Many technical leads and store owners operate under the mistaken belief that once Google Search Console acknowledges the address change, the migration is complete. In reality, Google does not treat a site move as a permanent handover. The search engine continuously evaluates canonical signals across both hosts. When the technical stability of the new domain degrades, the search engine can autonomously revert its canonical choice.
This guide breaks down the underlying technical mechanics, identifies critical database traps in WooCommerce, and provides production-tested procedures to prevent indexing reversions.
Why Google reverts to the old domain months after migration
A domain migration reversal is not a random crawler glitch. It is the direct consequence of Google Canonicalization algorithms doing their job. Google does not view 301 redirects or Search Console submissions as irrevocable property transfers. Instead, it treats them as strong recommendations that must be verified on an ongoing basis by dozens of independent signals.
When Googlebot crawls an old domain and encounters an HTTP/1.1 301 Moved Permanently response, it begins transferring PageRank equity to the target address. At the same time, it audits the health of the destination domain. If any of the following technical failures occur over subsequent months:
- The new domain suffers intermittent 500, 502, or 504 server errors under heavy load from AI search bots and human shoppers.
- Multiple product or category pages on the new domain return
200 OKstatus codes with blank templates or PHP warnings, triggering automated soft 404 classifications. - The
rel="canonical"tags on the new host mistakenly point back to the old domain due to misconfigured SEO plugins or hardcoded child theme filters. - Internal navigation links (header menus, footers, product descriptions, breadcrumbs) continue referencing the legacy domain.
- The external backlink profile of the new domain remains negligible while proxy caching errors on the old host start dropping 301 headers.
When these discrepancies accumulate, the algorithmic confidence score for the new domain plummets. Once uncertainty crosses a critical threshold, Googlebot concludes that the migration was either misconfigured or abandoned, and systematically restores indexation of the original URLs.
How Google evaluates canonical signals during a site move
Canonicalization is a multi-layered decision engine. It does not simply read a single meta tag in the HTML head. Instead, it balances declared developer directives against observed network behavior.
What canonical signals determine domain selection in search algorithms
The table below outlines the hierarchy of signals evaluated by Googlebot when resolving duplicate or redirected URLs:
| Canonical signal | Decision weight | Verification layer | Common migration risk |
|---|---|---|---|
| HTTP 301 / 308 redirect | Very high | Network layer (HTTP header) | Redirect loops, temporary 302 status codes |
| Link rel canonical tag | Very high | Document layer (HTML head) | Tag pointing to old domain on new website |
| GSC Change of Address tool | High | Administrative layer | Tool expiration at 180 days or property mismatch |
| XML sitemaps | Medium | Discovery layer | Deleting old domain sitemaps prematurely |
| Internal navigation links | High | Site graph layer | Preserving legacy URLs in WordPress database |
| External backlinks | High | Global graph layer | Entire external link profile still points to old host |
| HTTPS and SSL certificate | Medium | Infrastructure layer | Expired TLS certificate causing security errors on old host |
When these signals conflict (for example, if an HTTP 301 redirect points to the new domain, but the HTML canonical tag on the new domain points back to the old domain), the canonicalization algorithm enters an undecided state. Over time, the algorithm defaults to the domain with longer historical tenure and stronger external link equity.
Why incorrect rel canonical tags trigger migration reversals
In WooCommerce environments, SEO plugins such as Yoast SEO, Rank Math, or The SEO Framework construct canonical URLs dynamically using the WordPress site options. If an engineer migrates files and database tables but fails to clean up legacy custom code in the child theme:
// Dangerous legacy filter in child theme functions.php
add_filter('wpseo_canonical', function($canonical) {
return str_replace('new-store.com', 'old-store.com', $canonical);
});Every product page on the new domain immediately broadcasts an unambiguous instruction to Googlebot: this page is merely an alternate copy, and the authoritative primary document lives on the old domain. After indexing thousands of pages with conflicting directives, Googlebot accepts the instruction and demotes the new domain from search results.
What 301 redirect mistakes break a WooCommerce store migration
Configuring URL forwarding requires more than adding a couple of catch-all rules in .htaccess. On high-volume e-commerce catalogs, subtle routing flaws trigger invisible indexing failures.
Why redirect chains and CDN limits cause traffic reversals
Edge computing platforms introduce unexpected constraints. For instance, Cloudflare Pages enforces a strict 100 KB size limit on its _redirects configuration file (approximately 2,000 to 2,500 static routing lines). When a deployment includes a 400 KB redirects file, the edge platform does not abort the build with a fatal error. Instead, it silently truncates the configuration at the 100 KB boundary.
Consequently, the first 2,000 product URLs forward as intended with clean 301 headers, while the remaining 15,000 deep category and product links produce unhandled 404 errors or collapse onto the homepage.
Another frequent failure mode is redirect chaining:
Old URL -> New URL (HTTP) -> New URL (HTTPS non-www) -> New URL (HTTPS www with trailing slash)According to Google’s documentation on HTTP errors, Googlebot follows up to 10 redirect hops when crawling web content, and the URL Inspection tool does not follow redirects at all. The site move guide also advises against chains: redirect every old URL straight to its final destination. Each intermediate hop is one more HTTP request before the content is reached, multiplied by every URL in the catalogue.
How to redirect faceted navigation and filter parameters cleanly
WooCommerce stores produce millions of URL variations through GET parameters:
?filter_color=black?filter_size=xl&min_price=100?brand=manufacturer-a
A frequent architectural error is attempting to map every single filter variation statically in rewrite tables. This inflates server configuration files and causes memory exhaustion in web servers. The robust engineering approach relies on dynamic rules in Nginx:
# Nginx configuration on the old domain host: preserving request URIs and parameters
server {
listen 443 ssl http2;
server_name old-store.com www.old-store.com;
ssl_certificate /etc/ssl/certs/old-store.crt;
ssl_certificate_key /etc/ssl/private/old-store.key;
# Exact 1:1 forwarding with full path and query string preservation
location / {
return 301 https://new-store.com$request_uri;
}
}By leveraging the $request_uri variable, a request for https://old-store.com/category/shoes/?filter_color=black forwards immediately to https://new-store.com/category/shoes/?filter_color=black in a single network hop, preserving all crawl signals.
How to migrate a WooCommerce database without breaking taxonomy relations
The WordPress database structure uses specialized serialization formats. Theme settings, widget arrangements, payment gateway options, and Gutenberg block layouts are stored as serialized PHP objects.
Why raw SQL search-and-replace queries corrupt serialized data
A serialized string in PHP includes explicit byte-length counters. Consider a simplified record in the wp_options table:
s:19:"https://old-store.com";The header s:19 states that the following string has an exact length of 19 characters. If an engineer executes a naive SQL query inside MySQL or phpMyAdmin:
-- DANGEROUS QUERY: DESTROYS PHP SERIALIZED DATA ARRAYS
UPDATE wp_options
SET option_value = REPLACE(option_value, 'old-store.com', 'new-ecommerce-store.com');The new domain new-ecommerce-store.com contains 24 characters, but the length indicator remains stored as s:19. When WordPress attempts to read this option using unserialize(), the PHP runtime throws a data integrity exception and returns empty values. Payment gateway credentials vanish, shipping zone rules reset to defaults, and Gutenberg block structures fail to render.
Production WP-CLI script for safe domain replacement in MySQL
The standard engineering method for updating domains across a WordPress database is the WP-CLI command-line tool. It reads serialized entries into memory, performs string replacements, recalculates byte lengths, and serializes the data cleanly before committing the changes.
Here is a tested Bash automation script that handles database backups, dry runs, and cache clearing:
#!/usr/bin/env bash
# Automated safe domain migration for WooCommerce
set -euo pipefail
OLD_DOMAIN="old-store.com"
NEW_DOMAIN="new-store.com"
WP_PATH="/var/www/new-store/public"
echo "=== Starting database migration procedure ==="
# 1. Create a full database backup before running modifications
wp db export "${WP_PATH}/backup-pre-migration-$(date +%F).sql" --path="${WP_PATH}"
# 2. Run a dry run to inspect matched tables and values
echo "Testing replacements with dry run..."
wp search-replace "https://${OLD_DOMAIN}" "https://${NEW_DOMAIN}" \
--all-tables \
--dry-run \
--path="${WP_PATH}"
# 3. Execute the live replacement on full HTTPS URLs
echo "Executing live search-replace for HTTPS addresses..."
wp search-replace "https://${OLD_DOMAIN}" "https://${NEW_DOMAIN}" \
--all-tables \
--precise \
--recurse-objects \
--path="${WP_PATH}"
# 4. Replace bare domain strings while skipping post GUID columns
wp search-replace "${OLD_DOMAIN}" "${NEW_DOMAIN}" \
--all-tables \
--precise \
--skip-columns=guid \
--path="${WP_PATH}"
# 5. Flush and regenerate WooCommerce permalink structures
echo "Flushing rewrite rules..."
wp rewrite flush --hard --path="${WP_PATH}"
# 6. Flush Redis or Memcached object cache
wp cache flush --path="${WP_PATH}"
echo "=== Database migration completed cleanly ==="Notice the flag --skip-columns=guid. According to WordPress core engineering specifications, the guid column in wp_posts represents a permanent unique identifier for feed readers and must never be altered during a domain migration.
How long to keep the old XML sitemap and server active
A frequent operational mistake is decommissioning the old server or allowing DNS registrations to lapse six months after a site move.
Google Search Central guidelines state that redirect infrastructure must remain operational for a minimum of 12 months. In enterprise e-commerce, the recommended strategy is to maintain the legacy domain and its redirect server indefinitely. An expired domain can be snapped up by third parties to host link networks, instantly poisoning your historical backlink equity.
The old domain should also continue serving a dedicated XML sitemap listing all legacy URLs:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Legacy XML sitemap on old-store.com listing redirected URLs -->
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://old-store.com/product/business-laptop/</loc>
<lastmod>2026-10-14</lastmod>
</url>
<url>
<loc>https://old-store.com/category/electronics/</loc>
<lastmod>2026-10-14</lastmod>
</url>
</urlset>Submit this sitemap inside the Google Search Console property for the old domain. This gives Googlebot a direct roadmap of legacy URLs to recrawl periodically, ensuring that the 301 Moved Permanently response is recognized as stable and permanent.
How to check server logs and detect indexing reversions in Search Console
Detecting indexing anomalies early prevents catastrophic revenue drops. When a migration begins to unravel, symptoms appear in server logs weeks before rankings fluctuate in search results.
What anomalies to monitor in GSC Page Indexing reports
Keep a close eye on three metrics within Google Search Console:
- Page Indexing report on the new domain: A sudden spike in Crawled - currently not indexed or Duplicate without user-selected canonical. This signals that Googlebot is hesitating to incorporate new URLs into its primary index.
- Performance report on the old domain: If search impressions on the legacy domain begin climbing after months of near-zero activity, Google is actively serving old URLs to users again.
- URL Inspection tool: Test key category and product URLs. If the Google-selected canonical field lists the old domain while the User-declared canonical lists the new domain, your site is suffering from an active canonical conflict.
How to monitor HTTP status codes in Cloudflare Logpush and Nginx
Inspecting access logs reveals real-time Googlebot behavior. To filter crawler traffic on the legacy server, run this shell command:
# Filter Nginx access logs for Googlebot response codes on the legacy domain
awk -F'"' '$6 ~ /Googlebot/ { print $1, $2, $3 }' /var/log/nginx/old-store.access.log \
| awk '{ print $1, $6, $7 }' \
| sort | uniq -c | sort -nr | head -n 30Under healthy conditions, this report should show 100 percent 301 responses. Any appearance of 200, 302, 404, or 502 status codes indicates routing bugs that require immediate remediation.
How to resolve internal links in Gutenberg blocks and ACF fields
One of the most persistent causes of domain migration reversions in WordPress is lingering internal links. Even after executing wp search-replace, legacy URLs often remain embedded in custom data stores, such as base64-encoded strings, JSON metadata in wp_termmeta, or hardcoded navigation links.
Audit the following structural areas:
- WordPress navigation menus: Navigate to Appearance -> Menus and ensure that Custom Links do not contain hardcoded references to
old-store.com. - Full Site Editing templates: Check block HTML files located inside
/templatesand/partsdirectories for static links to terms of service or contact pages. - ACF Flexible Content fields: Complex homepage layouts often store relations as IDs, but WYSIWYG text modules frequently contain static links typed during content entry.
- Checkout extensions: Verify that third-party payment plugins or express checkout extensions do not store legacy callback URLs in their internal settings.
To scan rendered HTML across the new catalog for lingering legacy links, use a command-line crawler:
# Scan the new store for any remaining references to the old domain
wget --spider --recursive --no-verbose --output-file=wget-scan.log https://new-store.com || true
grep "old-store.com" wget-scan.log || echo "No direct links to the old domain detected."How to fix your website in 7 steps if Google reverts a domain migration
If your online store has suffered an indexing reversion and old URLs are reappearing in organic search results, execute this step-by-step recovery plan:
+-------------------------------------------------------------------+
| RECOVERY WORKFLOW FOR MIGRATION REVERSALS |
+-------------------------------------------------------------------+
|
v
[ STEP 1: Audit HTTP headers and eliminate 301 loops ]
(Ensure every legacy URL returns clean 301)
|
v
[ STEP 2: Verify rel canonical tags on the new host ]
(Zero product pages should reference old domain)
|
v
[ STEP 3: Fix soft 404 errors across product catalog ]
(Out-of-stock items must serve valid 200 headers)
|
v
[ STEP 4: Re-run precise database search-and-replace ]
(Purge legacy URLs from menus, ACF, and footers)
|
v
[ STEP 5: Resubmit dual XML sitemaps in Search Console ]
(Maintain active sitemaps on both GSC properties)
|
v
[ STEP 6: Renew Change of Address tool in Search Console ]
(Re-verify domain ownership and submit request)
|
v
[ STEP 7: Build external link momentum for the new domain ]
(Update Google Business Profile, social accounts)- Audit HTTP headers: Use cURL to verify that every path on the legacy host returns an immediate
301status code to its exact counterpart on the new host. Remove intermediate hops to plain HTTP or alternate domain variations. - Correct rel canonical tags: Inspect rendered HTML on the new domain. Ensure that every canonical tag matches the current URL exactly, including HTTPS protocol and trailing slash standards.
- Eliminate soft 404 errors: Review the Search Console soft 404 report. Ensure out-of-stock WooCommerce items return a valid
200 OKstatus with clear stock indicators and related products, rather than empty pages. - Clean legacy database strings: Re-run
wp search-replacewith--preciseand--all-tablesflags to verify that no legacy URLs remain in theme settings or post content. - Manage dual XML sitemaps: Verify that the new domain sitemap contains exclusively clean
200 OKcanonical URLs, while the legacy domain sitemap lists all redirected paths. - Reapply Change of Address: If 180 days have passed since the original submission, resubmit the Change of Address request in Search Console after confirming all technical fixes are live.
- Reinforce external signals: Update website links in your Google Business Profile, payment gateways, social profiles, and industry directories to send strong external validation signals to search engines.
Technical conclusion for e-commerce engineers and architects
A domain migration reversal by Google is an unambiguous warning sign: the search engine has detected fundamental discrepancies between your declared migration intent and the operational reality of your infrastructure.
In modern e-commerce architectures, a successful domain transition relies on disciplined engineering:
- Redirects must be direct (a single network hop) and preserve all query parameters.
- WordPress and WooCommerce databases must be updated using WP-CLI to protect PHP serialized objects.
- Canonical tags and internal links must point exclusively to the new domain from the moment DNS switches over.
- The legacy domain, SSL certificate, and XML sitemaps must remain operational for at least 12 months.
Before executing production DNS cuts, consider booking a dedicated WordPress migration assessment to audit redirect rules, database references, and taxonomy parity.
Adhering to these engineering protocols eliminates the risk of indexing reversions and safeguards store revenue throughout the migration lifecycle.







