What does Google say about SEO? /
Quick SEO Quiz

Test your SEO knowledge in 5 questions

Less than a minute. Find out how much you really know about Google search.

🕒 ~1 min 🎯 5 questions

Official statement

If you don't have distinct content for different devices, using the HTTP Vary header is unnecessary. However, its presence is not a problem if you have already implemented it.
5:49
🎥 Source video

Extracted from a Google Search Central video

⏱ 57:22 💬 EN 📅 30/10/2015 ✂ 10 statements
Watch on YouTube (5:49) →
Other statements from this video 9
  1. 9:23 Faut-il vraiment rediriger les mobiles vers l'accueil quand la page n'existe pas en responsive ?
  2. 11:21 Pourquoi les redirections mobiles cassent-elles encore votre SEO ?
  3. 19:14 Les redirections 301 suffisent-elles vraiment à sauver vos rankings lors d'un changement de domaine ?
  4. 23:38 Les interstitiels mobiles sont-ils vraiment un handicap pour votre SEO ?
  5. 38:06 Les données structurées JavaScript sont-elles vraiment indexées par Google ?
  6. 43:24 Faut-il vraiment dupliquer vos données structurées entre mobile et desktop ?
  7. 44:44 Comment éviter que le contenu dupliqué sabote votre indexation avec la balise canonical ?
  8. 47:37 Pourquoi Google n'indexe-t-il pas toutes les URLs de votre sitemap ?
  9. 50:46 Google a-t-il vraiment besoin d'optimisations spécifiques pour la recherche vocale ?
📅
Official statement from (10 years ago)
TL;DR

Google confirms that the HTTP Vary header is only needed if you serve different content based on devices. If your site uses responsive design with the same HTML for all devices, this header is pointless. However, its presence won't penalize your SEO if you implemented it in the past.

What you need to understand

What is the HTTP Vary header and what does it do?

The HTTP Vary header informs browsers and proxies that the content of a URL can vary based on certain criteria. For SEO, we mainly refer to Vary: User-Agent, which signals that the server delivers different HTML depending on the type of device.

This header was crucial during the dynamic serving era when sites served specific HTML for mobile and different HTML for desktop under the same URL. Without this signal, intermediate caches risked serving the desktop version to a mobile user or vice versa. Google strongly recommended this practice at the time.

Why does Google now say it’s optional?

Responsive design has replaced dynamic serving. Today, the majority of sites use the same HTML with CSS breakpoints to adapt to screens. In this case, the content doesn't vary based on User-Agent: it is identical.

Google is simplifying its position. If you serve the same content to all devices, the Vary: User-Agent header doesn't provide any useful information to the search engine. It becomes redundant, a remnant from a different time in mobile web development.

What happens if I have already implemented it?

Google states that the presence of the Vary header is not problematic. It’s not a negative signal that would harm your crawl budget or indexing. The engine simply ignores what it doesn't understand or that does not apply.

This tolerance makes sense. Many sites have migrated from dynamic serving to responsive without cleaning up their server configuration. Removing this header may involve changes in Nginx, Apache, or the CDN. Google does not want to penalize a harmless historical configuration.

  • The Vary: User-Agent header is relevant only with distinct content per device (dynamic serving)
  • With a responsive design, this header is unnecessary but harmless
  • Google does not penalize its presence; it simply ignores it
  • This statement clarifies a gray area that has persisted since the adoption of mobile-first strategies

SEO Expert opinion

Does this statement align with what we observe in the field?

Yes. Technical audits have shown for years that responsive sites with Vary: User-Agent do not experience crawl or indexing disadvantages. Google has always been quite flexible on this point in practice, even if its documentation remained vague.

What confuses practitioners is that Google long recommended this header in its documentation on dynamic serving. Many developers implemented it as a precaution, even on responsive sites. This statement now avoids wasting time debating its usefulness during audits.

What nuances should be added to this claim?

The devil is in the details. Some sites serve identical HTML but with different resources (images, scripts) depending on the device. In this case, Vary remains relevant for intermediate caches, even if Google doesn’t care.

Moreover, this statement does not cover Vary: Accept-Encoding or other variants. It specifically targets the User-Agent in a mobile vs desktop context. Do not remove all your Vary headers without careful consideration.

When does this rule not apply?

If you are still practicing dynamic serving, the Vary: User-Agent header remains mandatory. Some complex e-commerce sites or legacy platforms maintain this architecture for performance or compatibility reasons.

Similarly, if you use separate URLs for mobile (m.example.com) and desktop, the Vary header does not apply: each URL serves unique content. In this case, the rel alternate links the versions, not the HTTP header.

Warning: If you are migrating from dynamic serving to responsive, ensure that your CDN cache is properly purged. An active Vary: User-Agent with now identical HTML can create unnecessary duplications in intermediate caches.

Practical impact and recommendations

What should you do with this information?

If you have a responsive site and the Vary: User-Agent is present in your HTTP headers, you can keep it. There is no urgency to remove it; Google will not penalize you. It is a minor technical debt, not a blocking issue.

If you are launching a new site or restructuring your architecture, do not add it. Simplify your server stack. The less unnecessary configuration you have, the less maintenance you will need to manage.

How can I check if my site uses this header?

Inspect the HTTP headers of your main pages using a tool like curl, Postman, or Chrome's DevTools (Network tab). Look for the line "Vary:" in the server response. If it contains "User-Agent", you are using it.

Also test by simulating different User-Agents. If the returned HTML is strictly identical, the header is redundant. If you see differences (hidden sections, different scripts), you are practicing dynamic serving and need to keep the Vary.

What pitfalls should I avoid when cleaning up this configuration?

Do not remove the Vary header if you are unsure whether you serve exactly the same HTML. Some CMS or frameworks subtly modify content based on the device, even on a supposedly responsive site. Check first.

If you use a CDN like Cloudflare or Fastly, the Vary header can influence their caching strategy. Removing a Vary: User-Agent can unify your caches and improve your hit ratio. Test in staging before deploying.

  • Inspect your HTTP headers for Vary: User-Agent
  • Compare the HTML served to different User-Agents (mobile vs desktop) to confirm it is identical
  • If you are practicing dynamic serving, definitely keep this header
  • On a modern responsive site, remove the header during the next technical overhaul to simplify the stack
  • Clear CDN caches after any modifications to the Vary configuration
  • Document your choice in the project’s technical guidelines to avoid future regressions
The HTTP Vary: User-Agent header is a remnant of dynamic serving. On a responsive site, it is unnecessary but harmless. Google does not penalize it, so there is no rush to remove it. When undertaking a redesign or server optimization, take the opportunity to clean up this configuration if it’s no longer serving a purpose. While these technical adjustments are minor, they contribute to a healthy server architecture. If you lack internal resources to audit your HTTP configuration and optimize your stack, hiring a specialized SEO agency can expedite the diagnosis and avoid manipulation errors in complex production environments.

❓ Frequently Asked Questions

Dois-je retirer l'en-tête Vary: User-Agent de mon site responsive ?
Non, ce n'est pas obligatoire. Google précise que sa présence ne pose aucun problème. Vous pouvez le conserver sans risque, mais inutile de l'ajouter sur un nouveau site.
L'en-tête Vary: User-Agent ralentit-il le crawl de Googlebot ?
Non. Google ignore cet en-tête sur les sites responsive qui servent le même HTML pour tous les appareils. Il n'a aucun impact négatif sur le crawl budget.
Qu'est-ce que le dynamic serving et pourquoi l'en-tête Vary était-il important ?
Le dynamic serving consiste à servir un HTML différent selon le device sur la même URL. Le Vary: User-Agent signalait aux caches qu'il fallait stocker plusieurs versions. Avec le responsive, cette pratique a disparu.
Que se passe-t-il si je retire le Vary: User-Agent d'un site en dynamic serving ?
Les caches intermédiaires et CDN risquent de servir la mauvaise version HTML aux utilisateurs. Google peut aussi indexer la version desktop au lieu de la version mobile. Ne le retirez pas dans ce cas.
L'en-tête Vary: Accept-Encoding est-il concerné par cette déclaration ?
Non. Cette déclaration de Google vise uniquement le Vary: User-Agent dans un contexte mobile vs desktop. Le Vary: Accept-Encoding reste pertinent pour la compression gzip/brotli.
🏷 Related Topics
Content HTTPS & Security AI & SEO

🎥 From the same video 9

Other SEO insights extracted from this same Google Search Central video · duration 57 min · published on 30/10/2015

🎥 Watch the full video on YouTube →

Related statements

💬 Comments (0)

Be the first to comment.

2000 characters remaining
🔔

Get real-time analysis of the latest Google SEO declarations

Be the first to know every time a new official Google statement drops — with full expert analysis.

No spam. Unsubscribe in one click.