---
title: Making query strings agnostic
summary: null
url: >-
  https://www.fastly.com/documentation/guides/full-site-delivery/performance/making-query-strings-agnostic
---

Under normal circumstances, Fastly would consider these URLs different objects that are cached separately:

- `http://example.com`
- `http://example.com?asdf=asdf`
- `http://example.com?asdf=zxcv`

It is possible, however, to have them all ignore the query string and return the same cached resource.

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3.   Click **Edit configuration** and then select the option to clone the active version.

4.   Click **Content**.

5. Click **Create header**.

   ![the Header window](/img/new-header-agnostic-query-string.png)

6. Fill out the **Create a header** fields as follows:
   - In the **Name** field, enter a description for the header (e.g., `New query string name`).
   - From the **Type** menu, select **Request**, and from **Action** menu, select **Set**.
   - In the **Destination** field, enter `url`.
   - In the **Source** field, enter `req.url.path`.
   - From the **Ignore if set** menu, select **No**.
   - Set the **Priority** field to whatever priority you want.

7. Click **Create** to create the new header.

8.   From the **Activate** menu, select **Activate on Production** to deploy your configuration changes.

The request will be sent to the origin as a URL without the query string.

For more information about controlling caching, see our documentation on [cache freshness](https://www.fastly.com/documentation/guides/concepts/cache/cache-freshness).

## Related content

- [Query string VCL features](https://www.fastly.com/documentation/reference/vcl/functions/query-string/)
