← All posts
Guides28 Oct 2026 · 2 min read

Keeping UTM parameters when redirecting a URL

Control whether incoming query parameters follow a redirect, understand duplicate keys, and test the exact URL your destination receives.

RedirectDuck team
RedirectDuck mascot

A campaign link often contains more than a path. Parameters such as utm_source, utm_medium and utm_campaign tell the destination's analytics where a visit came from.

A redirect can carry those values to the next URL, but the destination still has to interpret them. RedirectDuck's setting controls the URL; it does not configure your analytics platform.

Turn on query forwarding

Consider this rule:

Source:        go.example.com/autumn
Destination:   https://shop.example.com/collection
Forward query: enabled

A request to:

https://go.example.com/autumn?utm_source=newsletter&utm_campaign=autumn

produces:

https://shop.example.com/collection?utm_source=newsletter&utm_campaign=autumn

New rules default to query forwarding. Review the setting when editing or importing a rule so the behavior is deliberate.

Parameters already in the destination are kept

If the destination includes ?channel=partner, forwarding adds the incoming parameters after it. The merge retains destination parameters as well as incoming ones.

That also means duplicate names are possible. For example, a destination with utm_source=fixed and a request with utm_source=email can produce:

?utm_source=fixed&utm_source=email

RedirectDuck does not pick one of those values for you. Applications may interpret repeated parameters differently, so avoid specifying the same tracking key in both places unless you have tested the receiving system.

Decide whether incoming values belong at the new site

With Forward query disabled, the incoming query is omitted. Parameters written into the destination itself remain.

The setting applies to the incoming query as a whole. It is not a per-parameter allowlist, and it does not selectively keep UTM tags while discarding everything else. If that is your requirement, account for it in your destination setup before using the rule.

Review links containing search terms, account references or other values before forwarding them to a different site.

Test the complete URL

Paste a full example, including its query string, into the rule tester. Inspect the resulting destination rather than only the domain name.

For a live check:

curl -sS -o /dev/null -D - 'https://go.example.com/autumn?utm_source=newsletter&utm_campaign=autumn'

Use your real hostname. Quoting the URL keeps the shell from treating the ampersand as a command separator. Look at the Location header, then open the link in a browser and confirm that the destination's analytics receives the intended campaign values.

A successful redirect proves the request reached its next address. It does not prove that a campaign was attributed correctly; check both sides of the handoff.

Point your old domain at us

One DNS record, HTTPS included. Free for your first domain.

Start for free