Should I use the Vary HTTP header on URLs that redirect based on user-agent?

What’s Google’s position about continuing to recommend the HTTP Vary: User-Agent header for specific mobile websites after big players like Akamai said they don’t cache the URLs that include it? Would you still recommend using it?
Christian Oliveira, Madrid

More about redirects and user-agent detection:

Have a question? Ask it in our Webmaster Help Forum:!forum/webmasters

Want your question to be answered on a video like this? Follow us on Twitter and look for an announcement when we take new questions:

More videos:
Webmaster Central Blog:
Webmaster Central:


26 thoughts on “Should I use the Vary HTTP header on URLs that redirect based on user-agent?”

  1. Good explanation.

    The real issue now is with responsive web technologies, there is no need to have multiple different variations for mobile to tablet to desktop. There might be some very specific circumstances where it would require a different approach but that should be the exception not the rule.

    In a fully responsive website, the Vary Accept header proves to be of little value based on this explanation, due to only having a single "view" per page. Also since this header is used very little and given little weight, it would make sense you may not want to include it, in the event browsers start using the header in unexpected ways that could potentially cause conflicts without being aware.

  2. This is a pretty weak position on the part of Google. Basically they are saying they do not want to do the most minimal amount of work to come up with a better option to identify varying content. For example, it would be pretty easy to come up with a standard VARY by screen size and specific browser capabilities that servers and CDNs could support.

  3. Why does it seem to me that all of these videos have a question and then Matt says: "Use the thing the way it is meant to be used and Google *might* use it to tailor search results."? Could it be that people try too hard with SEO and just using the technology in a smart intentional way is the best practice?

  4. Shows the importance of dynamic serving that Google cares about indexing the different HTML based on the device type…while its a moot point with responsive design since its just the same HTML, just presented differently via CSS. Thus actual Mobile SEO can be done with Dynamic Serving.

  5. Hi Mark, your additional question is quite interesting, and in fact that is exactly the answer this video session should follow up on, or else, this video isn't really helpful to us either (perhaps some webmasters will find it useful)
    Here's what we read about it developersDotgoogleDotcom/webmasters/smartphone-sites/redirects
    We are always interested in knowing more about Google and seo implications of mobile sites. C'mon Matt, we are waiting for a follow up.

Leave a Reply

Your email address will not be published. Required fields are marked *