Title: Vary HTTP response header
Author: WordPress VIP Documentation
Published: November 19, 2025

---

 1. [Caching](https://docs.wpvip.com/caching/)
 2. [Page cache](https://docs.wpvip.com/caching/page-cache/)
 3. [Customize page cache behavior](https://docs.wpvip.com/caching/page-cache/customize-behavior/)
 4. Vary HTTP response header

#  Vary HTTP response header

On the VIP Platform, the [`Vary` HTTP response header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Vary)
is respected for these values:

 * `origin`
 * `RSC`
 * `x-vip-go-segmentation`
 * `x-vip-go-auth`
 * `x-country-code`
 * `x-continent`
 * `x-region`
 * `x-metro-code`
 * `x-city`
 * `x-postal-code`

## Vary cached content by IP geolocation

The `Vary` [IP geolocation response headers can be utilized by WordPress and Node.js applications](https://docs.wpvip.com/caching/page-cache/cache-api/ip-geolocation/)
to deliver variations of cached content based on an end user’s global location.

For WordPress sites, country-based IP geolocation can also be managed with the [VIP Go Geo Uniques plugin](https://github.com/Automattic/vip-go-geo-uniques).
The plugin is specifically designed to work with the VIP Platform’s page cache, 
but is currently limited to only respect the `vary: x-country-code` header.

## Vary cached content by User-Agent class

For all requests (except those by logged-in WordPress users) the `x-mobile-class`
HTTP request header is populated with 1 of 4 values that correspond to VIP’s classification
of the request’s `User-Agent`.

A WordPress or Node.js application can conditionally alter its response by inspecting
the value of the `x-mobile-class` request header. The result will be cached correctly
in its own page cache “bucket”.

| `x-mobile-class` response | Response description | 
| `desktop` | This device is likely a desktop or it did not match any of the known user agents we know about. | 
| `tablet` | This device is likely a tablet (Android / iOS) | 
| `smart` | This device is likely a smart phone | 
| `dumb` | This device is likely a “dumb” phone |

_All possible values for the `x-mobile-class` HTTP response header and their descriptions_

Last updated: November 19, 2025