All Collections
Features
Features
Understanding and Managing Query String Parameter Merging in Short.io
Understanding and Managing Query String Parameter Merging in Short.io
Andy Kostenko avatar
Written by Andy Kostenko
Updated over a week ago

Overview

Short.io provides a convenient way to shorten long URLs for easier sharing and tracking. A notable feature of Short.io is its ability to merge query string parameters from both the short and the original long URL. This article explains how this merging behavior works and how you can control it if needed.

Default Behavior: Merging Query String Parameters

When you create a shortened URL using Short.io, it automatically merges the query string parameters from the short URL with those of the destination URL. Here’s how it works:

  • Example Scenario:

    • Short URL: https://short.link/abc?a=1&b=2

    • Destination URL: https://destination.com/?b=1&c=3

    • Resulting URL: https://destination.com/?a=1&b=2&c=3

In this example, the parameters a=1 and b=2 from the short URL are merged with b=1 and c=3 from the destination URL. Notice that the parameter b is overwritten by the value from the short URL.

Disabling Parameter Merging

In some cases, you might not want the query string parameters to merge. Short.io provides a straightforward way to prevent this merging:

  • Solution: Add the shortio_nomerge=1 parameter to your destination URL.

  • Example Scenario with Disabled Merging:

    • Short URL: https://short.link/abc?a=1&b=2

    • Destination URL with shortio_nomerge: https://destination.com/?b=1&c=3&shortio_nomerge=1

    • Resulting URL: https://destination.com/?b=1&c=3

When the shortio_nomerge=1 parameter is included in the destination URL, Short.io will not merge the query string parameters from the short URL. Instead, it will respect the original parameters of the destination URL.

Key Points to Remember

  • The default behavior of Short.io is to merge query string parameters from both URLs.

  • To disable this merging, add shortio_nomerge=1 to your destination URL.

  • This feature ensures flexibility and control over how your URLs are constructed and how parameters are handled.

Need Further Assistance?

If you have any questions or require additional assistance with managing query string parameters in Short.io, please don't hesitate to reach out to our support team.

Did this answer your question?