Query parameters can be present in the link someone clicks and missing from the page that eventually loads. The cause might be a redirect response, application routing, an intentional cleanup of tracking data, or even a link that never included the parameters in the first place.
This guide shows how to compare the starting URL with each destination in a redirect chain, identify where the query changes, and investigate without exposing sensitive values.
Key Takeaways
- A redirect does not automatically carry the original query string to a different destination. The browser follows the URL supplied by the redirect response.
- Inspect each hop, not just the starting link and final page. The first response whose destination changes or omits a parameter is the key diagnostic clue.
- Applications and redirect rules may deliberately keep, replace, filter, or discard parameters.
- Test authenticated flows carefully. Query strings can contain credentials, one-time tokens, or other private data.
What happens to the query string during a redirect?
A query string is the part of a URL after ?, such as campaign=spring&step=1 in this example:
https://example.test/start?campaign=spring&step=1
For an HTTP redirect, the server returns a redirect status and a Location header. The browser follows the destination in that header. If the destination has a different path and no query string, the original query is not automatically appended.
For example, this response points to a destination with no query:
HTTP/1.1 302 Found
Location: /landing
The browser navigates to /landing; it does not assume that campaign=spring&step=1 should be carried over.
A redirect can instead provide a new query string, replacing the original one, or explicitly include selected original parameters:
Location: /landing?step=2
Location: /landing?campaign=spring&step=1
A relative destination can also change the path or query. For example, Location: ?step=2 refers to the current path with a new query. The important evidence is the destination the browser actually receives—not an assumption that parameters should persist.
Find the exact hop where parameters change
Start with a harmless URL that reproduces the issue. Use test values rather than real tokens or personal information:
https://example.test/start?campaign=test-run&step=1
Then follow this workflow:
- Check the starting link. Confirm the URL in the address bar, email, button, or page source really contains the expected parameters. If they are missing before the first request, this is not a redirect dropping them.
- Record every destination. In browser developer tools, open the Network panel, enable Preserve log, and load the URL. Inspect each document request, its status, and any
Locationresponse header. The first hop whose destination no longer contains a parameter narrows down where to investigate. - Compare the query at each step. Record the parameter names and values at the initial URL, each redirect destination, and the final URL. Compare the actual strings as well as their meaning: encoding, repeated keys, ordering, and changed values can matter to application code.
- Repeat using the real route and method. If the issue occurs after a form submission or sign-in, test that flow in an authorized session. A simple request may not reproduce client-side navigation, cookie-dependent behavior, or POST handling.
- Check what happens after the redirect. If the final address still contains a parameter but the page behaves as though it is absent, investigate the application’s routing and parameter-reading logic. The value may be ignored, filtered, or read from a different URL.
For a simple, non-authenticated GET request, curl can show response headers without following the redirect:
curl -sS -D - -o /dev/null 'https://example.test/start?campaign=test-run&step=1'
Look for the response status and Location header. To inspect a chain, curl can follow redirects and print the effective final URL:
curl -sS -L -D - -o /dev/null \
-w '\nFinal URL: %{url_effective}\n' \
'https://example.test/start?campaign=test-run&step=1'
The headers are printed for the responses in the chain; compare each Location value to find where the query changes. This is a diagnostic for a basic GET, not a substitute for reproducing a browser flow that depends on cookies, JavaScript, or a form submission. Avoid putting sensitive URLs into shell history or shared logs.
Common causes to investigate
Do not assume that every missing parameter points to a broken redirect rule. Use the hop-by-hop evidence to determine which part of the flow changed the URL.
Redirect configuration points to a clean URL
A web server, proxy, CDN, or redirect-management rule may send all requests to a fixed destination, such as /landing. If the rule does not preserve or rebuild the query string, the destination will omit it. Check the configuration that produced the observed Location header, including rule order and conditions.
Application code builds a new destination
An application may generate a redirect URL from a route name or a fixed path rather than from the incoming request. It may also deliberately allow only a known set of parameters. In that case, the destination reflects the code’s choices, not automatic browser behavior. Inspect the redirect handler and any parameter allowlist or URL-building helper.
A later route or sign-in flow replaces the URL
The first redirect might preserve the query, while a subsequent application route, client-side navigation, or authentication step changes it. Compare each hop, especially when parameters disappear only after a form submission, account sign-in, or return from an external service. Check how the return destination is constructed and which values the flow is designed to retain.
A link intentionally omits parameters
A page, email, or campaign system might create a link to a clean destination rather than forwarding tracking or form parameters. Compare the original link with the first request. If the parameters were never sent, changing a later redirect cannot restore their original values; determine whether the link should include them at all.
The parameter is changed, filtered, or interpreted differently
A query can be present but behave differently because a value was renamed, encoded differently, or replaced. Applications can also treat repeated parameters differently—for example, reading the first value, the last value, or all values. Check the raw URL and the code that parses it before concluding that the browser removed the parameter.
Distinguish redirect loss from application behavior
The address bar and the page’s behavior provide different clues:
- The parameter is absent from a redirect’s
Locationheader: investigate the component that generated that redirect. - The parameter is present in the header but missing from the next request: check the actual browser navigation and whether another redirect or client-side action intervened.
- The parameter is still in the final address but the feature does not use it: inspect routing, parsing, validation, and application logic.
- The parameter is absent from the first request: inspect how the link was created or opened.
A redirect inspection tool can help reveal a chain, but verify important behavior in the browser and environment where the problem occurs. A [Redirect Checker](Redirect Checker) is useful for inspecting redirects; it does not reproduce every cookie-dependent, authenticated, or JavaScript-driven flow.
Test authenticated flows without exposing secrets
Login and account links sometimes carry values that should not be treated as ordinary tracking parameters. A query may contain a one-time code, a session-related value, a signed return URL, or other sensitive data. Anyone who can see a shared URL, screenshot, browser-history entry, or copied log may be able to see its query string.
- Reproduce the issue with dummy values where possible. Do not paste live credentials, session identifiers, or one-time tokens into a public redirect checker, support ticket, or chat.
- Use browser developer tools in an authorized session when cookies or login state are required. Do not send authentication cookies to an unfamiliar service or paste them into a command you plan to share.
- Redact query values in screenshots and logs. Keep parameter names only if they do not reveal sensitive information.
- If a live one-time link or token has been exposed, follow your organization’s process for invalidating or rotating it.
- Do not infer that a parameter should survive sign-in just because it appeared before sign-in. Check the intended application flow and how it validates return destinations.
Common Mistakes
- Checking only the final URL. It shows the outcome, not which redirect or route changed it.
- Assuming every redirect preserves the query. A destination URL may omit the original query or supply a different one.
- Using a different test from the failing flow. A plain GET may not match a POST, authenticated session, or JavaScript navigation.
- Using
curl -Ias the only test. A HEAD request can behave differently from the GET or form submission that fails. Reproduce the relevant request method when it is safe to do so. - Sharing full URLs while asking for help. Query values can contain private or reusable data; redact them before sharing.
- Treating an online checker as a complete browser test. It may not share the browser’s cookies, session, or client-side behavior.
Best Practices
- Record the initial URL, each response status, each
Locationvalue, and the final URL. Redact sensitive values in any notes you share. - Use non-sensitive test parameters to establish whether the issue is about all query data or a particular key.
- Check both the redirect configuration and the application code that constructs destinations; either can change what is forwarded.
- Decide intentionally which parameters should persist. Preserve only the values the next step needs rather than forwarding an entire query string without review.
- Verify the fix through the same user flow, request method, and environment that originally failed.
Conclusion
To diagnose query parameters lost after a redirect, compare the starting URL with every destination in the chain. The first point where the query is omitted or changed identifies where to investigate—whether that is a redirect rule, application routing, or an intentionally clean link. Use harmless test values and protect sensitive URLs while troubleshooting.
