Technical Guide: E-commerce Redirects & Store Migrations
When migrating an online store across platforms or restructuring catalog slugs, choosing the right HTTP status code and server directives provides strong signals to search engine crawlers and prevents broken customer links.
HTTP Status Codes (301 vs 308)
301 Moved Permanently: Permanent redirect for SEO migrations. Method preservation is not guaranteed; POST may be changed to GET by clients.
308 Permanent Redirect: Defined in RFC 9110, 308 mandates that the client strictly preserves the request method and body.
302 Found: Temporary redirect; method preservation not guaranteed.
307 Temporary Redirect: Temporary redirect with strict method preservation.
Server Directives & Context
NGINX: Uses exact location matching location = /old { return 301 /new$is_args$args; } inside the server { } block.
Apache: Uses mod_rewrite with anchored regex RewriteRule ^old$ /new [R=301,L] for exact 1:1 matching and query control (using QSD when query strings should be discarded).
Cloudflare Bulk Redirects
Cloudflare Bulk Redirects handle high-volume URL migrations at the edge without putting load on your origin server. The generated CSV conforms to the official 7-column schema: Source URL, Target URL, Status code, Preserve query string, Include subdomains, Subpath matching, Preserve path suffix.
Avoiding Chains and Loops
Redirect chains (A → B → C) waste crawler crawl budget and add latency. Redirect loops (A → B → A) cause browser failure. Our live diagnostics detect duplicate sources, self-redirects, chains, and circular loops before you deploy.