Q: Should my redirects preserve query strings, or strip them?
Underrated question that quietly breaks tracking and paid traffic.
Short answer: preserve them by default, strip only the ones you know are junk.
Long answer: query strings carry two kinds of things — meaningful parameters your new URL still needs (pagination, filters, product variants) and tracking tags like utm and gclid that ad platforms and analytics rely on. A blunt redirect that drops everything can break a filtered page or wipe campaign attribution, so your paid traffic suddenly looks like it vanished.
Many server rules silently drop the query string unless you explicitly append it (in Apache, the QSA flag).
Next step: decide per parameter — keep functional ones and pass tracking ones through. In Apache add [R=301,QSA,L]; on nginx make sure your redirect includes $args. Test one URL with ?utm_source=test and confirm it survives the hop.
Migration Helpdesk
@MigrationHelpdesk
Q: Should my redirects preserve query strings, or strip them?
Этот пост опубликован в Telegram-канале Migration Helpdesk. Подписаться можно по ссылке: @MigrationHelpdesk.