Pitfalls when implementing the “VARY User-Agent” server response
-
We serve up different desktop/mobile optimized html on the same URL, based on a visitor’s device type.
While Google continue to recommend the HTTP Vary: User-Agent header for mobile specific versions of the page (http://www.youtube.com/watch?v=va6qtaiZRHg), we’re also aware of issues raised around CDN caching; http://searchengineland.com/mobile-site-configuration-the-varies-header-for-enterprise-seo-163004 / http://searchenginewatch.com/article/2249533/How-Googles-Mobile-Best-Practices-Can-Slow-Your-Site-Down / http://orcaman.blogspot.com/2013/08/cdn-caching-problems-vary-user-agent.html
As this is primarily for Google's benefit, it's been proposed that we only returning the Vary: User-Agent header when a Google user agent is detected (Googlebot/MobileBot/AdBot).
So here's the thing: as the server header response is not “content” per se I think this could be an okay solution, though wanted to throw it out there to the esteemed Moz community and get some additional feedback.
You guys see any issues/problems with implementing this solution?
Cheers!
linklater
-
So, there are lots of 'ifs' here, but the primary problem I see with your plan is that the CDN will return the content to Googlebot without the request hitting your server so you won't have the option to serve different headers to Googlebot.
Remember that every page is the main HTML content (which may be static or dynamically generated for every request), and then a whole bunch of other resources (Javascript and CSS files, images, font files etc.). These other resources are typically static and lend themselves far better to being cached.
Are your pages static or dynamic? If they are dynamic then you are possibly not benefitting from them being cached anyway, so you could use the 'vary' header on just these pages, and not on any static resources. This would ensure your static resources are cached by your CDN and give you a lot of the benefit of the CDN, and only the dynamic HTML content is served directly from the server.
If most of your pages are static you could still use this approach, but just without the full benefit of the CDN, which sucks.
Some of the CDNs are already working on this (see http://www.computerworld.com/s/article/9225343/Akamai_eyes_acceleration_boost_for_mobile_content and http://orcaman.blogspot.co.uk/2013/08/cdn-caching-problems-vary-user-agent.html) to try and find better solutions.
I hope some of this helps!
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
IP Address of Server an SEO Factor??
Hello all, Interested to hear your thoughts on this. What's best practice re server IP location. Is it OK for that to be in the US if your company is in Europe? Any potential issues? John Mueller says server location is irrelevant, but some developer I work with thinks IP address of the server is a factor. I can't see how it would be in this day and age. https://www.seroundtable.com/seo-geo-location-server-google-17468.html Many thanks, Gill.
Intermediate & Advanced SEO | | Cannetastic0 -
Exact Syntax for Canonical to PDFs for Windows Server
Hi There, I have got in my web several PDFs with the same content of the HTML version. Thus I need to set up a canonical for each of them in order to avoid duplicate content. In particular, I need to know how to write the exact syntax for the windows server (web.config) in order to implement the canonical to PDF. I surfed the web but it seems I cannot find this piece of info anywhere Thanks a lot!!
Intermediate & Advanced SEO | | Midleton0 -
Site Structure: How do I deal with a great user experience that's not the best for Google's spiders?
We have ~3,000 photos that have all been tagged. We have a wonderful AJAXy interface for users where they can toggle all of these tags to find the exact set of photos they're looking for very quickly. We've also optimized a site structure for Google's benefit that gives each category a page. Each category page links to applicable album pages. Each album page links to individual photo pages. All pages have a good chunk of unique text. Now, for Google, the domain.com/photos index page should be a directory of sorts that links to each category page. Alternatively, the user would probably prefer the AJAXy interface. What is the best way to execute this?
Intermediate & Advanced SEO | | tatermarketing0 -
Implementing Canonicals on Existing ASP Ecommerce Store with Pagination
So I have a store which has been around for a while and is custom built on ASP.net. Store has thousands of sku's and at least a few hundred subcategories. Have been tackling a bunch of the onsite issues and for categories which have more than 6 products in them, there are multiple pages and a view all present. Example.com/category example.com/category?PageIndex=2 example.com/category?PageIndex=3 example.com/category?PageIndex=4 example.com/category?viewall=True As well as the following for every page example.com/category?PageIndex=2&viewall=True So I know how I wish to handle the pagination/canoncial issue as per google's suggestions you do it to the view all or they have the rel=next/prev. But my question is google says if view all is present they should already do a good job at ranking the view all version. Well in the rankings, there are a lot of page1 variations showing. So once this is implementated, is it safe to assume that I will see a drop? Feel like if it was a brand new site it is easy but for something this old and established, it could cause some decent harm which at the current time we are already tackling a massive list of issues which in the long haul will improve it. Looking for some insight for someone who has dealt with ASP.net and this specific area. thanks
Intermediate & Advanced SEO | | Sean_Dawes
Sean0 -
What redirect code (301,302,303) should I use for pages that are available only for logged in users?
If for example they go to a page like /premium-content, they will be automatically redirected (302) to the login page. Because now I do a 302 redirect, in Google Webmaster Tools it sais I have duplicate title issues for each of the pages that are accessible only for the logged in users. If I would do a 301 redirect, I basically tell Google that those pages are moved, but it is not the case because logged in users will see those pages.
Intermediate & Advanced SEO | | STEFANOAGBAGLA0 -
Schema.org Implementation: "Physician" vs. "Person"
Hey all, I'm looking to implement Schema tagging for a local business and am unsure of whether to use "Physician" or "Person" for a handful of doctors. Though "Physician" seems like it should be the obvious answer, Schema.org states that it should refer to "A doctor's office" instead of a physician. The properties used in "Physician" seem to apply to a physician's practice, and not an actual physician. Properties are sourced from the "Thing", "Place", "Organization", and "LocalBusiness" schemas, so I'm wondering if "Person" might be a more appropriate implementation since it allows for more detail (affiliations, awards, colleagues, jobTitle, memberOf), but I wanna make sure I get this right. Also, I'm wondering if the "Physician" schema allows for properties pulled from the "Person" schema, which I think would solve everything. For reference: http://schema.org/Person http://schema.org/Physician Thanks, everyone! Let me know how off-base my strategy is, and how I might be able to tidy it up.
Intermediate & Advanced SEO | | mudbugmedia0 -
How to Implement Massive SEO Modifications
Hi everyone, I'm implementing some fairly significant changes on a clients website and wanted to know if it was better to implement all the changes at once or if I should implement the changes gradually. The changes are: 1. Amended information architecture 2. Completely new URL's 3. New meta data and some new on page content 4. Meta robots 'no index, follow' approximately 90% of the site Can I make all these changes in one go (that would be my preference), or should I gradually implement? What are the risks? Many thanks James
Intermediate & Advanced SEO | | jamesjackson1 -
What is the Ideal Structure for User Generated Product Reviews on My Site?
I apologize for the lengthy post, but I need help! Here is my current structure for product reviews: My product pages displays a set number of user product reviews before displaying a link to "see all reviews". So: http://www.domain.com/product/product-page Has product details, specs (usually generic from manufacturer) and 5 user product reviews. If there are more than 5, there is a link to see all reviews: http://www.domain.com/reviews/product-page?page=1 Where each page would display 10 user product reviews, and paginate until all user reviews are displayed. I am thinking about using the Rel Canonical tag on the paginated reviews pages to reference back to the main product page. So: http://www.domain.com/reviews/product-page?page=1 http://www.domain.com/reviews/product-page?page=2 http://www.domain.com/reviews/product-page?page=3 Would have the canonical URL of: http://www.domain.com/product/product-page Does this structure make sense? I'm unclear what strategy I should use, but currently the product review pages account for less than 2% of overall organic traffic. Thanks ahead of time!
Intermediate & Advanced SEO | | Corp0