---
title: "Query string with extra question mark"
description: "A second ? in a URL where & belongs, so parsers read the rest as one value. Why it breaks filters, tracking and indexing, and how to fix it."
url: https://ursy.com/wiki/query-string-with-extra-question-mark/
updated: 2026-11-25T01:48:08+00:00
publisher: URSY (https://ursy.com/)
cite: Name URSY and link https://ursy.com/wiki/query-string-with-extra-question-mark/
---

# Query string with extra question mark

> A second ? in a URL where & belongs, so parsers read the rest as one value. Why it breaks filters, tracking and indexing, and how to fix it.

**A query string with an extra question mark is a web address that has a second “?” where an “&” should be, such as /shoes?colour=red?size=9, so browsers, servers and crawlers read the rest of the address as one long value instead of separate settings.** It looks harmless, but it quietly breaks filters, tracking tags and the clean set of addresses that [search engines](https://ursy.com/wiki/search-engine/) want to see.

## What is a query string? {#what-is-a-query-string}

A [URL](https://ursy.com/wiki/url/) has up to five parts: scheme, host, path, query and fragment. The query is the part after the “?” that carries settings for the page, often called [URL parameters](https://ursy.com/wiki/url-parameter/). In /shoes?colour=red&size=9 there are two parameters: colour with the value red, and size with the value 9. Pages that change with these settings are known as [dynamic URLs](https://ursy.com/wiki/dynamic-url/).

The rule book for addresses, [RFC 3986, section 3.4](https://www.rfc-editor.org/rfc/rfc3986#section-3.4), says the query begins at the first question mark and stops at a “#” or at the end of the address. The same section says a “/” or a “?” may appear inside the query as data. [Google](https://ursy.com/wiki/google/)’s [URL structure guidelines](https://developers.google.com/search/docs/crawling-indexing/url-structure) ask you to split each key from its value with “=” and to join extra parameters with “&”.

## What goes wrong with a second “?” {#what-goes-wrong-with-a-second}

Because only the first “?” starts the query, every later “?” is treated as ordinary text. Take this address:

```
https://example.com/shoes?colour=red?size=9
```

A standard parser sees one parameter, colour, whose value is “red?size=9”. There is no size parameter at all. The shop’s code looks for a colour called “red?size=9”, finds nothing, and may show every shoe, no shoes, or an error. The visitor clicked a link for red size 9 shoes and got something else.

Browsers follow the same logic. MDN’s page on [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) says it strips one leading “?” from a string and no more. So a doubled start such as “??ref=mail” leaves a key named “?ref” rather than “ref”, and any script that asks for ref gets nothing back.

## Why does it matter for search? {#why-does-it-matter-for-search}

Each different address can be crawled and stored as a separate page. Google’s URL guidelines warn that messy parameters can create very large numbers of addresses pointing at the same or similar content, and that [Googlebot](https://ursy.com/wiki/googlebot/) may then use far more bandwidth than it needs. That spends [crawl budget](https://ursy.com/wiki/crawl-budget/) and feeds [index bloat](https://ursy.com/wiki/index-bloat/).

A broken address also tends to show the wrong content. If the filter fails and the page lists every product, you now have [duplicate content](https://ursy.com/wiki/duplicate-content/) of your main category page. If it shows an empty list, Google may treat it as a [soft 404](https://ursy.com/wiki/soft-404/). On sites with [faceted navigation](https://ursy.com/wiki/faceted-navigation/) a single template bug can repeat this across thousands of filter links.

Google’s page on [consolidating duplicate URLs](https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls) lists ways to point it at the address you prefer. It calls a redirect and a [canonical tag](https://ursy.com/wiki/canonical-tag/) strong signals, and a sitemap a weak one. It also says Google will make its own choice in the end.

## Why does it matter for AI answers? {#why-does-it-matter-for-ai-answers}

[AI assistants](https://ursy.com/wiki/ai-assistant/) and their [AI crawlers](https://ursy.com/wiki/ai-crawler/) fetch the same addresses people click. When a [broken link](https://ursy.com/wiki/broken-link/) lands on the wrong list of products, the assistant reads the wrong facts and may repeat them. A cited link that opens the wrong page also wastes the click you earned, which matters when you are tracking [AI referral traffic](https://ursy.com/wiki/ai-referral-traffic/). Clean, single-meaning addresses are part of good [AI crawlability](https://ursy.com/wiki/ai-crawlability/).

## What causes it? {#what-causes-it}

- **Adding tracking to a link that already has a query.**  Someone pastes ?utm_source=newsletter onto /shoes?colour=red. The [UTM tags](https://ursy.com/wiki/utm-parameters/) then hide inside the colour value and the campaign never shows in [Google Analytics 4](https://ursy.com/wiki/google-analytics-4/).
- **Template code that always adds “?”.**  A theme builds links by joining the page address, a “?” and the new setting, without checking whether a query is already there.
- **Redirect rules that add a query.**  A [redirect](https://ursy.com/wiki/redirect/) sends old addresses to a new one and adds “?ref=old” to a target that already holds parameters.
- **Copy and paste in emails, ads and social posts.**  Links built by hand often pick up a doubled “?” or a “?” after a “#”.

## Common mistakes when fixing it {#common-mistakes-when-fixing-it}

- **Fixing the link but not the source.**  If a template made the bad link, it will keep making new ones. Fix the code that builds links.
- **Blocking the addresses in [robots.txt](https://ursy.com/wiki/robots-txt/) only.**  Blocked addresses can still be [indexed from links](https://ursy.com/wiki/indexed-though-blocked-by-robots/), and Google cannot see a canonical tag on a page it is not allowed to fetch.
- **Leaving internal links pointing at the broken form.**  Update your [internal links](https://ursy.com/wiki/internal-linking/) so crawlers stop finding the bad version.
- **Encoding the second “?” as %3F and calling it fixed.**  That makes the address legal but still keeps the wrong meaning. Use “&” to start the next parameter.

## A worked example {#a-worked-example}

A small clothing shop sends a newsletter with this link:

```
https://example.com/dresses?size=12?utm_source=newsletter&utm_medium=email
```

The shop’s filter reads size as “12?utm_source=newsletter”, which matches no size, so the page shows all dresses. Analytics sees utm_medium but no utm_source, so the visits fall into the wrong channel. The fixed link is:

```
https://example.com/dresses?size=12&utm_source=newsletter&utm_medium=email
```

The shop then adds a canonical tag on filtered pages pointing to the address it wants indexed, and a permanent redirect from the old broken form, as explained in our [301 vs 302 guide](https://ursy.com/wiki/301-vs-302-redirect/).

## How to check it {#how-to-check-it}

1. Search your crawl export, [server logs](https://ursy.com/wiki/server-logs/) or analytics [landing pages](https://ursy.com/wiki/landing-page/) for addresses with two “?” characters. In a spreadsheet, a pattern such as \?.*\? finds them.
2. Paste a suspect link into our [URL parser](https://ursy.com/webmaster-tools/url-parser/) to see exactly which keys and values a parser finds.
3. Build campaign links with our [UTM builder](https://ursy.com/webmaster-tools/utm-builder/), which joins parameters for you.
4. Run the address through our [redirect checker](https://ursy.com/redirect-checker/) and [canonical checker](https://ursy.com/canonical-checker/) to see where it lands and which page it names as the main version.
5. Check the whole site with our [SEO audit](https://ursy.com/seo-audit/) and look for parameter loops with the [crawl trap checker](https://ursy.com/crawl-trap-checker/).
6. In [Google Search Console](https://ursy.com/wiki/google-search-console/), use [URL inspection](https://ursy.com/wiki/url-inspection/) on one broken address to see which canonical Google picked.

In URSY Pro, the [duplicate content report](https://ursy.com/pro/duplicate-content/) (Pro) and [site audit](https://ursy.com/pro/site-audit/) (Pro) are being built to flag these addresses as they appear.

## Questions {#questions}

### Is a second question mark against the rules? {#is-a-second-question-mark-against-the-rules}

No. RFC 3986 allows “?” inside the query. The problem is meaning, not legality: the second “?” does not start a new parameter.

### Will Google ignore it? {#will-google-ignore-it}

Not reliably. Google reads the address as written. Give it a clean link, a canonical tag and, where the broken form was shared widely, a redirect.

### Does it affect the fragment? {#does-it-affect-the-fragment}

A “#” ends the query, so anything after it is the fragment and is not sent to the server. A “?” placed after a “#” never reaches your server at all.

## Related words {#related-words}

- [URL parameter](https://ursy.com/wiki/url-parameter/)
- [UTM parameters](https://ursy.com/wiki/utm-parameters/)
- [Dynamic URL](https://ursy.com/wiki/dynamic-url/)
- [SEO-friendly URL](https://ursy.com/wiki/seo-friendly-url/)
- [Canonical tag](https://ursy.com/wiki/canonical-tag/)

## Sources {#sources}

- [RFC 3986, Uniform Resource Identifier: Generic Syntax, section 3.4 Query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4), checked 25 November 2026
- [Google Search Central: URL structure best practices](https://developers.google.com/search/docs/crawling-indexing/url-structure), checked 25 November 2026
- [Google Search Central: How to specify a canonical URL](https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls), checked 25 November 2026
- [MDN Web Docs: URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams), checked 25 November 2026
- [MDN Web Docs: URL search property](https://developer.mozilla.org/en-US/docs/Web/API/URL/search), checked 25 November 2026

*Updated 25 November 2026 by URSY.*
