<b>Q: Should my 301s live at the CDN edge or on the origin server?</b>
Great question, and one most guides skip.
Short answer: edge if you can, origin if you must — but never both for the same path.
Long answer: when you put redirects at the CDN (Cloudflare Rules, Fastly), bots get the 301 in one fast hop without ever touching your app. That's faster and survives even if origin is down. Origin-level (your .htaccess or app router) is fine too, but it's slower and easier to forget when you decommission the old box.
The real trap is layering both — edge sends to one URL, origin sends somewhere else, and you get a chain or a loop. Pick one layer per rule.
Next step: in your redirect map, add a column "where this lives" (edge / origin). One value per row. Audit for any path that appears in both.
Migration Helpdesk
@MigrationHelpdesk
<b>Q: Should my 301s live at the CDN edge or on the origin server?</b>
Этот пост опубликован в Telegram-канале Migration Helpdesk. Подписаться можно по ссылке: @MigrationHelpdesk.