Official statement
Other statements from this video 8 ▾
- 4:10 Pourquoi Google a-t-il rebaptisé Webmaster Tools en Search Console ?
- 7:17 Les liens raccourcis goo.gl peuvent-ils vraiment booster votre stratégie de deep linking mobile ?
- 11:56 Le mobile-friendly reste-t-il un facteur de ranking déterminant pour votre site ?
- 14:10 La vitesse mobile échappe-t-elle vraiment aux critères de ranking mobile-friendly ?
- 16:33 PageSpeed Insights vs test mobile-friendly : pourquoi Google utilise-t-il deux outils différents ?
- 21:01 Faut-il vraiment un sitemap mobile séparé quand on a des URLs distinctes ?
- 23:42 Comment les listes locales influencent-elles vraiment vos positions dans les SERP ?
- 30:03 Google punit-il vraiment les réseaux de liens en silence ?
Google states that the HTTP header 'Vary: User-Agent' should only be applied on pages where the content truly differs based on the device. Applying this header indiscriminately across all pages can harm caching and slow down indexing. The recommendation is clear: segment your adaptive pages and only apply the header where HTML significantly varies between desktop and mobile.
What you need to understand
Why does Google emphasize the precise use of the 'Vary: User-Agent' header?
The HTTP header 'Vary: User-Agent' lets browsers and caching proxies know that a page may deliver different content depending on the requesting user agent. When this header is present, caching servers understand they need to store multiple versions of the same URL.
The problem? If you apply this header to all your pages when only a part of your content truly varies, you are unnecessarily fragmenting the cache. Googlebot then crawls multiple identical versions, which slows down exploration and dilutes your crawl budget.
What defines an adaptive web page in this context?
An adaptive page (adaptive responsive design) serves different HTML depending on the device, unlike pure responsive design that only adapts CSS. For instance, your desktop page displays a carousel with 10 images, while the mobile version loads only 3 to reduce the load.
In this specific case, the content genuinely varies, and the 'Vary: User-Agent' header is justified. However, if your page serves exactly the same HTML with only a few CSS adjustments, this header becomes counterproductive.
How can you identify pages that actually need this header?
Inspect your HTML source by comparing desktop and mobile. If the structural tags, textual content, images, or scripts differ, then yes, the header is relevant. A simple layout change via CSS does not count.
Also, monitor your server logs and response times. A fragmented cache leads to low hit rates and higher loading times for your mobile users. This is often the first signal that you are applying the header too broadly.
- Only apply 'Vary: User-Agent' on pages serving different HTML based on the device
- Avoid using this header globally across all URLs of your site
- Regularly check your cache logs to detect excessive fragmentation
- Clearly distinguish between responsive CSS (no Vary) and adaptive HTML content (Vary required)
- Document affected pages in your technical SEO strategy
SEO Expert opinion
Is this recommendation consistent with field observations?
Absolutely. I have audited dozens of sites that applied 'Vary: User-Agent' in a cargo cult manner, without understanding the real impact. The result: CDN cache rates dropping below 40%, Googlebot crawl times doubling, and degraded Core Web Vitals.
What’s surprising is how clearly Google states it. Usually, they are vague about HTTP headers. Here, the message is clear: stop using this header everywhere. It's a signal that many sites make this mistake and that it impacts their crawl infrastructure.
What nuances should be considered with this statement?
Google does not specify how to handle hybrid cases, those pages serving 95% of the same content but with minor variations. For example, a page that hides a promotional banner on mobile using server-side rendering. Technically, the HTML differs. Should the cache really be fragmented for that? [To be checked]
Another gray area includes sites using modern JavaScript frameworks with conditional server-side rendering. Next.js, Nuxt, Astro... all can generate different outputs based on the agent. Does Google's recommendation still hold when the content delta is minimal but structurally present?
In what cases could this rule pose a problem?
On e-commerce sites with advanced personalization, content may vary based on the device for business reasons. Mobile-first pricing, different geo-targeted offers, rearranged product sections... If you genuinely serve a different catalog based on the device, the header is legitimate.
Be wary of AMP or dedicated mobile versions. If you still maintain separate URLs (m.site.com), this recommendation does not apply directly. The 'Vary: User-Agent' becomes crucial to prevent Google from serving the desktop version to mobile devices.
Practical impact and recommendations
What actions should you take on your site?
Start with a complete audit of your HTTP headers. Use curl or a tool like Screaming Frog to extract all your 'Vary' headers from a representative sample of URLs. Then, compare the source HTML between desktop and mobile for each page type.
If you find that your site uses a pure CSS responsive design, remove the 'Vary: User-Agent' header immediately. You do not need it. However, if certain category or product pages load fewer elements on mobile, segment the application of the header only to those URLs.
What mistakes should be avoided at all costs?
Never configure the header at the global server level (Apache, Nginx) if all your pages do not require this treatment. Go down to the rules by page type, or even by URL if necessary. A poorly configured .htaccess can sabotage your caching performance.
Avoid also mixing multiple adaptive strategies on the same site. If you switch from adaptive design to pure responsive, clean up all the old headers. Hybrid configurations are the primary source of mobile-first indexing bugs.
How can you verify that your configuration is optimal?
Monitor your cache metrics before and after modifications. A good CDN shows a hit rate over 80% on static content. If you are below that after removing the header, it means other factors are fragmenting your cache (cookies, query strings...).
Also analyze your Search Console crawl reports. Disrupted mobile-first indexing due to poorly configured headers is indicated by significant discrepancies between discovered pages and indexed pages, or by high server response times in exploration stats.
- Audit all your 'Vary' HTTP headers on a representative sample of URLs
- Compare the desktop vs mobile source HTML for each key page type
- Remove the header from pure CSS responsive pages with no HTML variation
- Configure the header at the page level, not at the global server level
- Monitor your CDN hit rates before and after changes
- Check Search Console crawl reports to detect indexing anomalies
❓ Frequently Asked Questions
Le header 'Vary: User-Agent' ralentit-il vraiment le crawl de Google ?
Responsive CSS vs adaptatif HTML : comment faire la différence ?
Mon CDN applique 'Vary: User-Agent' par défaut, est-ce un problème ?
Faut-il supprimer le header sur un site qui mélange responsive et adaptatif ?
Comment tester si mon header 'Vary' impacte négativement mon indexation ?
🎥 From the same video 8
Other SEO insights extracted from this same Google Search Central video · duration 43 min · published on 28/05/2015
🎥 Watch the full video on YouTube →
💬 Comments (0)
Be the first to comment.