Glossary

What Is Query String?

A query string is the portion of a URL that comes after the ? character, used to pass parameters as key-value pairs. For example, in example.com/search?q=redirects&page=2, the query string is q=redirects&page=2.

Why It Matters

Query strings carry important context. Marketing teams use UTM parameters (?utm_source=google&utm_medium=cpc) to track campaign performance. E-commerce sites use query parameters for search, filtering, and sorting. Analytics platforms rely on query strings for attribution.

Query strings are part of the broader URL structure — specifically the portion after the path and before any fragment. When a URL with query parameters is redirected, those parameters can be preserved, stripped, or overwritten — depending on how the redirect is configured. Getting this wrong means losing campaign tracking data, breaking search functionality, or creating duplicate content issues.

Common Query String Parameters

  • UTM parameters: utm_source, utm_medium, utm_campaign, utm_content, utm_term — used by Google Analytics for campaign tracking
  • Search parameters: q, query, search — used for on-site search
  • Pagination: page, offset, limit
  • Filtering: Product filters, sorting options
  • Session/tracking: fbclid, gclid, ref

Query Strings and Redirects

When a URL is redirected, the query string behavior depends on the redirect configuration:

Pass-through (preserve): old.com/page?utm_source=googlenew.com/page?utm_source=google. The query string is appended to the destination URL. This is what you want for campaign tracking.

Strip: old.com/page?utm_source=googlenew.com/page. The query string is discarded. This is appropriate when the destination site uses different parameters.

Merge: The redirect destination has its own query parameters, and the incoming parameters are merged or appended.

How Domain Forward Handles This

Domain Forward preserves query strings during forwarding by default. When combined with path forwarding, the full URL path AND query string are passed to the destination: old.com/page?ref=123new.com/page?ref=123. This ensures campaign tracking and deep links work correctly through the redirect.

Related Terms

Related Features

Still Confused? Try It Free.

Set up your first domain forward in under 5 minutes. Free plan includes 5 domains.