A Question Mark and a Hash Do Different Jobs in a Campaign URL

You want a social link to identify a campaign and take readers directly to a checklist. That link may need both query parameters and a fragment. Moving punctuation around can turn a useful label into text your server never receives.

This explanation uses example.com, a reserved example domain. None of the sample addresses is a real affiliate tracking link.

Read the parts in order

Consider this fictional URL:

https://example.com/guide?utm_source=linkedin&utm_medium=social#checklist

The path identifies /guide. The question mark starts the query. The hash starts the fragment. In this example, the query contains two campaign labels, while the fragment identifies the checklist section.

RFC3986 defines query and fragment as separate URI components; the fragment is separated before dereferencing the resource. For ordinary HTTP navigation it is not part of the request target. Client-side code can still read the fragment and send data elsewhere, so a hash is not a privacy boundary. See RFC 3986, section 3.5 for the component rule and RFC 9110, section 17.11 for the redirect disclosure risk.

This matters when you inspect server-side records. A URL containing #checklist does not establish that the server recorded a checklist-section visit. A separate browser analytics implementation might observe it, but you must verify that implementation rather than assume it exists.

Put query parameters before the fragment

Here is a superficially similar example:

https://example.com/guide#checklist?utm_source=linkedin

Everything after the hash belongs to the fragment. The apparent utm_source text is not a normal server query parameter in this address. It can also stop a simple heading anchor from matching the intended section.

The practical correction is to construct the URL in the order expected by the receiving system. Do not assume a browser error will warn you about a misplaced campaign label. The page can still open while measurement or section navigation fails.

A fragment needs a destination that exists

For a basic HTML section link, the target page needs a matching identifier, such as an element whose id is checklist. A visible heading named “Checklist” is not proof that the builder assigned that exact identifier.

Check the actual saved reader page. Click the link and confirm where it lands. A sticky header can obscure the target even when the anchor technically works. A page redesign can also remove the target without breaking the base URL.

Some applications use fragments for routing rather than ordinary document sections. Follow that application's documented link format. Do not rewrite a working application URL merely because it differs from this simple article example.

Do not edit an affiliate URL by analogy

Owned landing-page campaign labels and partner referral parameters are different systems. A merchant may require specific keys, encoding or a supplied URL structure. Changing those values can damage attribution.

Keep the account-issued referral URL intact unless the program documents the exact modification you intend. Never append a second question mark by habit. If a supported link already has a query, additional parameters usually join that query with an ampersand, using the provider's encoding rules. This is a syntax explanation, not permission to modify a particular program's links.

Avoid placing customer email addresses, access tokens or other private values in campaign labels. Use nonpersonal identifiers such as guide_footer or october_education when the receiving system permits them.

Five source-level cases to recognize

All examples below are inert fragments of fictional owned URLs. They are not merchant links or instructions to modify a partner-issued destination.

Syntax can be inspected without making a tracked click
After the page pathQuery componentFragment componentWhat remains unproven
?utm_source=linkedin#checklistutm_source=linkedinchecklistThe section exists and reporting receives the label
#checklist?utm_source=linkedinNonechecklist?utm_source=linkedinIt is not a normal server query label
?utm_source=linkedin&utm_medium=socialTwo intended key/value pairs under a conventional query formatNoneThe receiver actually recognizes these keys
?utm_content=print%23card#checklistThe encoded%23 is data within the query valuechecklistEncoding is interpreted as intended by the receiver
#missing-sectionNonemissing-sectionAn element with that ID exists; the base page opening is insufficient

The URI standard defines components, not every site's parameter vocabulary. An ampersand-separated key/value convention must still agree with the receiving application. Do not double-encode an already issued URL or reconstruct a signed URL from its visible parts.

Your four-field campaign-link record

  1. Owned destination: correct page and, if used, actual section ID from current source.
  2. Permitted labels: nonpersonal campaign keys/values the receiving system supports; no email address, payment data or secret.
  3. Reader result: eventual authorized page/section/keyboard observation, or NOT TESTED.
  4. Measurement result: actual native reporting receipt and test exclusion, or NOT TESTED.

A redirect can change the path or query, but a missing fragment in an HTTP 3xx Location does not automatically remove the original fragment. Under RFC 9110, section 10.2.2, the browser inherits the original fragment when the redirect target has no fragment component. A redirect target with its own fragment takes precedence; an explicitly empty fragment can prevent inheritance. This can expose a fragment to scripts on a different destination origin, even though the fragment was not sent as an HTTP request target. Inspect the real redirect chain and the destination page before relying on section navigation or privacy. Keep source-only syntax checks separate from a working redirect, successful attribution or real commission claim.

Redirects: three outcomes that can change the destination fragment

These are standards-based illustrations, not observed behavior on Demandward, a merchant, or a particular browser session. Each starts with the fictional address https://example.com/old#checklist and an HTTP redirect.

What an HTTP 3xx Location does to a fragment under RFC 9110
Redirect LocationResulting fragmentWhat to verify
https://example.com/new#checklist is inheritedThe new page really contains a matching section and the browser lands there.
https://example.com/new#details#details replaces the originalThe destination uses its own documented fragment meaning.
https://example.com/new#An explicitly empty fragment prevents the old label from carrying forwardDo not infer that a privacy-sensitive fragment is safe merely because it is absent from server logs.

Practical QA: capture the intended starting URL, inspect the final address after each actual authorized redirect, confirm the target element exists, and verify analytics independently. Never put credentials, buyer identifiers or personal information in either component. If a cross-origin redirect is involved, treat inherited fragments as a privacy review item. See RFC 9110, section 17.11.

Use a two-part check

First, test the reader outcome: correct page, correct section and usable keyboard navigation. Second, test the measurement outcome in the system intended to receive the labels. A visible label in the address bar proves only that the address contains that text.

Keep controlled tests separate from real visitor activity. Do not count your own link check as a qualified lead or inferred sale.

Your next step: review one owned campaign link. Mark its path, query and fragment, then verify the section jump and the actual reporting behavior separately.

Sources and scope

Checked October29,2026. The URL examples and review method are original. No analytics or affiliate integration was tested for this article.

  1. RFC 3986, section 3.4: query component
  2. RFC 3986, section 3.5: fragment component
  3. RFC 9110, section 10.2.2: Location and fragment inheritance
  4. RFC 9110, section 17.11: fragment disclosure after redirects