# Dynamic serving

Category: [Technical SEO](https://seo-geo-glossary.com/en/glossary/category/technical-seo/) › [HTML, mobile & accessibility](https://seo-geo-glossary.com/en/glossary/category/technical-seo/html-mobile-accessibility/)

**Dynamic serving** is a mobile configuration in which one URL returns different HTML depending on the device. The server reads the `User-Agent` request header and sends either the desktop or the mobile version. In SEO the term is narrower than "dynamic website" or "dynamic content".

## How does it work?
Google lists dynamic serving as one of three mobile setups, next to responsive design and separate URLs. It delivers different HTML from the same URL using user-agent detection and the `Vary: user-agent` response header. MDN explains that `Vary` tells caches which request headers influenced the response, so they store a separate copy for each value. Without it, a cache can hand the desktop version to a phone.

MDN's caching guide notes that the `User-Agent` header has a very large number of variations, which drastically reduces the chance that a cache is reused. Google recommends responsive design because it is the easiest pattern to implement and maintain.

Dynamic serving differs from dynamic rendering, where crawlers get a pre-rendered HTML version of a JavaScript page. Google describes that as a workaround.

## Example
```http
GET /page HTTP/1.1
User-Agent: Mozilla/5.0 (iPhone; ...)

HTTP/1.1 200 OK
Vary: User-Agent
```
A desktop browser requesting the same URL receives different HTML and the same `Vary` header.

## Common mistakes
- `Vary: User-Agent` is missing, so a cache serves the wrong version.
- The mobile HTML has less content than the desktop HTML, although Google indexes the mobile version.

## Mobile site configurations compared

| Configuration | URL | HTML | Technical signals | Google's position |
|---|---|---|---|---|
| Responsive design | same URL on every device | same HTML; the layout adapts to the screen size | none needed; content and metadata are identical on mobile and desktop | recommended as the easiest pattern to implement and maintain |
| Dynamic serving | same URL on every device | different HTML per device, chosen by user-agent detection | Vary: user-agent response header | supported; the mobile version needs the same content as desktop |
| Separate mobile URLs | a separate URL per device, e.g. m.example.com | different HTML per device | mobile page: rel="canonical" to the desktop URL; desktop page: rel="alternate" with media to the mobile URL; redirects based on user agent and Vary | supported; the desktop URL is always canonical, and hreflang links mobile to mobile and desktop to desktop |

Sources: [Google Search Central: Mobile site and mobile-first indexing best practices (last updated 2025-12-10)](https://developers.google.com/search/docs/crawling-indexing/mobile/mobile-sites-mobile-first-indexing); [MDN: Vary header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Vary). Last checked: October 8, 2026

## Related terms

- [Dynamic URL](https://seo-geo-glossary.com/en/glossary/dynamic-url/index.md)
- [Dynamic rendering](https://seo-geo-glossary.com/en/glossary/dynamic-rendering/index.md)

## Sources

- [Mobile sites and mobile-first indexing – Google Search Central](https://developers.google.com/search/docs/crawling-indexing/mobile/mobile-sites-mobile-first-indexing)
- [Vary header – MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Vary)
- [Dynamic rendering as a workaround – Google Search Central](https://developers.google.com/search/docs/crawling-indexing/javascript/dynamic-rendering)
- [HTTP caching, Vary – MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching)

---

Last updated: October 8, 2026
URL: https://seo-geo-glossary.com/en/glossary/dynamic-serving/
