# Dynamic serving

> Dynamic serving returns different HTML from one URL depending on the device. How the Vary header fits in, how it compares to responsive design, and a check.

Canonical: https://scaplet.com/glossary/dynamic-serving

Glossary Glossary · Crawling and indexing

Dynamic serving returns different HTML from one URL depending on the device. How the Vary header fits in, how it compares to responsive design, and a check.

2 min

read

2

sources

Oct 30, 2026

updated

Scaplet Editorial Team

author

In one line

Dynamic serving is a mobile setup where one URL returns different HTML depending on the requesting device, detected from the user agent. Google says it relies on user-agent sniffing and the Vary: user-agent response header, and recommends responsive design instead because it is the easiest pattern to implement and maintain.

30-second check

## Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fdynamic-serving%20(%22Dynamic%20serving%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fdynamic-serving%20(%22Dynamic%20serving%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fdynamic-serving%20(%22Dynamic%20serving%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fdynamic-serving%20(%22Dynamic%20serving%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

## At a glance

4 facts from the sources below

Same URL for every device

URL

User-agent sniffing

Detection

Vary: user-agent

Required header

Responsive web design

Google's preference

_01_At a glance

## Three ways to serve mobile, compared

Google's [mobile-first indexing](/glossary/mobile-first-indexing) guide names three configurations. Dynamic serving sits between the other two: the URL doesn't change, but the HTML does.

Configuration

### [Responsive design](/glossary/responsive-design)

URLs

One URL per page

HTML

Same HTML for every device

Relies on

Nothing device-specific on the server

Configuration

### Dynamic serving

URLs

One URL per page

HTML

Different HTML per device

Relies on

User-agent sniffing and `Vary: user-agent`

Configuration

### Separate URLs

URLs

A URL per device (such as an `m.` host)

HTML

Different HTML on separate URLs

Relies on

The [user agent](/glossary/user-agent) and `Vary` headers, to redirect users to the right version

Google's guidance on mobile-specific advice applies only to dynamic serving and separate URLs. If you run responsive design, there is nothing in that guide to do.

_02_At a glance

## Anatomy of a dynamic-served response

Part

### Same request URL

Job

Every device, including crawlers, asks for `/pricing`

Part

### `User-Agent` request header

Job

What your server inspects to choose a variant

Part

### `Vary: User-Agent` response header

Job

Tells caches that the response depended on the `User-Agent` request header, so they store variants separately

Part

### Different body

Job

The mobile and desktop HTML. Google indexes the mobile version, crawled with its smartphone agent

Same URL, two responses

```
GET /pricing HTTP/1.1 User-Agent: Mozilla/5.0 (iPhone; ...) HTTP/1.1 200 OK Vary: User-Agent Content-Type: text/html <!-- compact mobile HTML --> GET /pricing HTTP/1.1 User-Agent: Mozilla/5.0 (Windows NT 10.0; ...) HTTP/1.1 200 OK Vary: User-Agent Content-Type: text/html <!-- full desktop HTML -->
```

MDN describes `Vary` as listing the request parts that influenced the response, which makes caches store responses separately per listed header. It also says the same `Vary` value should be used on all responses for a URL, including `304 Not Modified` responses.

_03_Check it

## Check it in 2 minutes

**Missing Vary header** `Vary` is what tells caches the response depended on the `User-Agent` header. If the variants differ and the header is missing, a cache has no signal to keep them apart. Send it on every response for that URL.

Also confirm the mobile variant carries the same primary content, structured data and links as desktop, since Google uses the mobile version for indexing. See [mobile-first indexing](/glossary/mobile-first-indexing).

Compare mobile and desktop responses

```
M='Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 Chrome/120 Mobile Safari/537.36' D='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/120 Safari/537.36' curl -sI -A "$M" https://example.com/ | grep -i '^vary' # want: Vary: User-Agent curl -s -A "$M" https://example.com/ | wc -c curl -s -A "$D" https://example.com/ | wc -c # different sizes = variants exist
```

_04_Your call

## When to keep it, when to move

If this fits

### Keep dynamic serving if

- The mobile and desktop templates really are different and a rebuild isn't planned
- Your server already sets `Vary: User-Agent` consistently
- Content, metadata and structured data match across both variants

Or

### Move to responsive design if

- You maintain two templates that drift apart
- You're redesigning anyway: Google calls responsive the easiest to implement and maintain
- Cache behavior or crawler detection keeps causing bugs

Sources · 2

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- google.com
- mozilla.org

1. 01 [Mobile-first indexing best practices](https://developers.google.com/search/docs/crawling-indexing/mobile/mobile-sites-mobile-first-indexing) developers.google.com · checked 2026-11-01
2. 02 [Vary header (MDN)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Vary) developer.mozilla.org · checked 2026-11-01

Questions

## Asked a lot.

1 questions people ask next, answered from the sources on this page.

_01_ Is dynamic serving the same as dynamic rendering?

No. Dynamic serving changes HTML by device on the same URL. Dynamic rendering serves a rendered version to bots instead of client-side JavaScript. See the [dynamic rendering](/glossary/dynamic-rendering) entry.

## Keep learning

[All glossary](/glossary)

[Learn Cloaking Quality and policies](/glossary/cloaking) [Related Mobile-first indexing Technical SEO](/glossary/mobile-first-indexing) [Read next Dynamic rendering Rendering](/glossary/dynamic-rendering) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in glossary
[Dynamic rendering](/glossary/dynamic-rendering) [Dynamic search ads](/glossary/dynamic-search-ads) [E-E-A-T](/glossary/e-e-a-t) [Ecommerce SEO](/glossary/ecommerce-seo)

More in Crawling and indexing
[A record (DNS address record)](/glossary/a-record) [Bing Webmaster Tools](/glossary/bing-webmaster-tools) [Bot management](/glossary/bot-management) [Broken links](/glossary/broken-links) [cache: search operator](/glossary/cache-search-operator) [Canonical HTTP header](/glossary/canonical-http-header) [Canonical URL](/glossary/canonical-url) [Client-side rendering](/glossary/client-side-rendering) [Crawl budget](/glossary/crawl-budget) [Crawl errors](/glossary/crawl-errors) [Crawl stats report](/glossary/crawl-stats-report) [Duplicate content](/glossary/duplicate-content) [Dynamic serving](/glossary/dynamic-serving) [ETag](/glossary/etag) [Google Indexing API](/glossary/google-indexing-api) [Google Search Console](/glossary/google-search-console) [HTML sitemap](/glossary/html-sitemap) [HTTP status codes](/glossary/http-status-codes) [HTTPS](/glossary/https) [Hydration](/glossary/hydration) [Index bloat](/glossary/index-bloat) [Indexability](/glossary/indexability) [Indexing](/glossary/indexing) [IndexNow](/glossary/indexnow)

Terms on this page
[Mobile-first indexing](/glossary/mobile-first-indexing) [Responsive design](/glossary/responsive-design) [User agent](/glossary/user-agent) [Dynamic rendering](/glossary/dynamic-rendering)

Free · 2 minutes

## Know the term. _Now check your site._

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **+212%** organic clicks in 90 days Ledgerly
