HTTP Vary:User-Agent Server or Page Level?
-
Looking for any insights regarding the usage of the Vary HTTP Header. Mainly around the idea that search engines will not like having a Vary HTTP Header on pages that don't have a mobile version, which means the header will be to be implemented on a page-by-page basis.
Additionally, does anyone has experience with the usage of the Vary HTTP Header and CDNs like Akamai?Google still recommends using the header, even though it can present some challenges with CDNs.
Thanks!
-
hey burnseo - if you're still getting notifications from this thread, would you happen to recall where you ended up finding info. that google recommends placing the vary header at page level? running into the same question myself. if you have links you could post to where you found the answer, that'd be great. thanks!
-
I would go by what Google recommends I cannot imagine Akamai being something bad for website or overwhelming it anyway. You may try using a C name with your www. straight to the CDN & if you're using a mobile subdomain like m. also having that go directly into your content delivery network.
I hope this is better help.
sincerely,
Thomas
-
I found some information that suggests that it is recommended to avoid using the Vary HTTP Header by User-Agent site-wide because search engines and (and this is Google) would assume the other version simply hadn't yet been discovered and perhaps keep looking for it. There is also a recommendation to implement the Vary Header on a page-level only when there is a mobile version. This only applies to sites that are serving mobile HTML content dynamically based in the user-agent. Additionally, there is some controversy around using the header when a CDN network like Akamai is in place because it can overload the site. Despite this controversy Google still recommends using the header. These seem to be two important points to consider before implementing the Vary HTTP Header.
-
Very true I shoud have compleated it woun't use a cell phone to Q&A
-
Thomas, it appears that this is taken from http://stackoverflow.com/questions/1975416/trying-to-understand-the-vary-http-header. Q&A is for original answers; if you are referring to another blog post, it's best to just put a link into the blog post and let people go there rather than copy work (that may be copyright) and use that as your answer. Thanks for understanding!
-
-
The
cache-control
header is the primary mechanism for an HTTP server to tell a caching proxy the "freshness" of a response. (i.e., how/if long to store the response in the cache) -
In some situations,
cache-control
directives are insufficient. A discussion from the HTTP working group is archived here, describing a page that changes only with language. This is not the correct use case for the vary header, but the context is valuable for our discussion. (Although I believe the Vary header would solve the problem in that case, there is a Better Way.) From that page:
Vary
is strictly for those cases where it's hopeless or excessively complicated for a proxy to replicate what the server would do.- This page describes the header usage from the server perspective, this one from a caching proxy perspective. It's intended to specify a set of HTTP request headers that determine uniqueness of a request.
A contrived example:
Your HTTP server has a large landing page. You have two slightly different pages with the same URL, depending if the user has been there before. You distinguish between requests and a user's "visit count" based on Cookies. But -- since your server's landing page is so large, you want intermediary proxies to cache the response if possible.
The URL, Last-Modified and Cache-Control headers are insufficient to give this insight to a caching proxy, but if you add
Vary: Cookie
, the cache engine will add the Cookie header to it's caching decisions.Finally, for small traffic, dynamic web sites -- I have always found the simple
Cache-Control: no-cache, no-store
andPragma: no-cache
sufficient.Edit -- to more precisely answer your question: the HTTP request header 'Accept' defines the Content-Types a client can process. If you have two copies of the same content at the same URL, differing only in Content-Type, then using
Vary: Accept
could be appropriate.Update 11 Sep 12:
I'm including a couple links that have appeared in the comments since this comment was originally posted. They're both excellent resources for real-world examples (and problems) with Vary: Accept; Iif you're reading this answer you need to read those links as well.
The first, from the outstanding EricLaw, on Internet Explorer's behavior with the Vary header and some of the challenges it presents to developers: Vary Header Prevents Caching in IE. In short, IE (pre IE9) does not cache any content that uses the Vary header because the request cache does not include HTTP Request headers. EricLaw (Eric Lawrence in the real world) is a Program Manager on the IE team.
The second is from Eran Medan, and is an on-going discussion of Vary-related unexpected behavior in Chrome:Backing doesn't handle Vary header correctly. It's related to IE's behavior, except the Chrome devs took a different approach -- though it doesn't appear to have been a deliberate choice.
-
-
Hey Thomas, thank you for your interest in answering my question. However, the question isn't really about using a CDN. It is more around how using the Vary HTTP Header can affect the CDN performance. In addition, I wanted to find guidance on where to implement the Vary HTTP Header as it was brought to my attention that search engines don't like it when this is implemented site wide even on pages that don't have a mobile version.
-
Hi Keri,
Thank you for the heads up on that. I definitely was having some technical issues. I have cleaned it up let me know if you think it is a need any more work.
Thank you for letting me know.
Sincerely,
Thomas
-
Thomas, I think the voice recognition software botched some of your reply. Could you go through and edit it a little? There are some words that seem to be missing. Thanks!
-
Hi,
For insights regarding the usage of the Vary HTTP Header.
I would check out this blog post right here
As far as using a content delivery network. I love them and have used quite a few. Depending on your budget there is a wide range
Use Anycast DNS with CDN's here is what I think of them.
#1 DNS DynECT (my fav)
#2 DNS Made Easy (great deal $25 for 10 domains for the YEAR)
#3 UltraDNS
#4 VerisignDNS
CDN's many have anycast DNS built in already
Check out this website it will give you a good view of what's going on this site
http://www.cdnplanet.com/cdns/
I don't know what you want for data however if you want a great CDN with support & killer price Max CDN it's only $39 for the first terabyte performs Amazon's cloudflaire Rackspace clouldfiles
My list of CDN's I would use the cost is anywhere form $39 a year to $4,000 a month if you said you where going to use video it will cost more as data adds up fast.
#1 Level 3 personal favorite content delivery network
http://www.level3.com/en/products-and-services/data-and-internet/cdn-content-delivery-network/
http://www.edgecast.com/free-trial/
http://mediatemple.net/webhosting/procdn/ You get 200 gb's a month for $20 it is 100% EdgeCast (just a reseller)
https://presscdn.com/ PRESSCDN is 50GB's for $10 month & gives you FOUR CDN's it has Max CDN, Edgecast, Akamai & cloudfront price for 150GB a month is $19
http://www.rackspace.com/cloud/files/
http://aws.amazon.com/cloudfront/
Look a thttp://cloudharmony.com/speedtest for speed testing
However please remember that coding makes a huge difference on websites and it is not really a fair depiction of speed.
You could use CloudFlare it is free I don't like it for for anything other than site protection it's not very fast and my opinion and is simply a proxy reverse proxy server
You get CloudFlare with Railgun already on
https://www.cloudflare.com/railgun cost is now $200 a month (Use Level 3 if paying that much)
Edge cast is a great content delivery network. However,you will have to buy it through a third-party that you want a full enterprise version. You can buy to media temple that you must use their DNS and it is only $20 a month.
However if you're going to spend over $20 a month I would strongly consider talking to Level 3. There notoriously high-priced however they just lowered their prices and you can negotiate some very sweet deals.
I would simply sign up for DNS made easy and MaxCDN if you don't have a content delivery network already & just convenient fast
It's also faster. It is faster than AWS cloudfront & rack space cloudfiles.
Max CDN is faster than anything else I have compared to the it's price range for almost double
But inexpensive service you will get Anycast DNS for $25 and the CDN would be $39 and that's for the year not the month
I hope this is been of help to you,and it answers your question. Please let me know if I could be of any more help.
Sincerely,
Thomas
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
-
Pages not indexable?
Hello, I've been trying to find out why Google Search Console finds these pages non-indexable: https://www.visitflorida.com/en-us/eat-drink.html https://www.visitflorida.com/en-us/florida-beaches/beach-finder.html Moz and SEMrush both crawl the pages and show no errors but GSC comes back with, "blocked by robots.txt" but I've confirmed it is not. Anyone have any thoughts? 6AYn1TL
Technical SEO | | KenSchaefer0 -
Very wierd pages. 2900 403 errors in page crawl for a site that only has 140 pages.
Hi there, I just made a crawl of the website of one of my clients with the crawl tool from moz. I have 2900 403 errors and there is only 140 pages on the website. I will give an exemple of what the crawl error gives me. | http://www.mysite.com/en/www.mysite.com/en/en/index.html#?lang=en | http://www.mysite.com/en/www.mysite.com/en/en/en/index.html#?lang=en | http://www.mysite.com/en/www.mysite.com/en/en/en/en/index.html#?lang=en | http://www.mysite.com/en/www.mysite.com/en/en/en/en/en/index.html#?lang=en | http://www.mysite.com/en/www.mysite.com/en/en/en/en/en/en/index.html#?lang=en | http://www.mysite.com/en/www.mysite.com/en/en/en/en/en/en/index.html#?lang=en | http://www.mysite.com/en/www.mysite.com/en/en/en/en/en/en/en/en/en/en/en/en/index.html#?lang=en | http://www.mysite.com/en/www.mysite.com/en/en/en/en/en/en/en/en/en/en/en/en/en/index.html#?lang=en | http://www.mysite.com/en/www.mysite.com/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/index.html#?lang=en | http://www.mysite.com/en/www.mysite.com/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/index.html#?lang=en | | | | | | | | | | There are 2900 pages like this. I have tried visiting the pages and they work, but they are only html pages without CSS. Can you guys help me to see what the problems is. We have experienced huge drops in traffic since Septembre.
Technical SEO | | H.M.N.0 -
Rel=canonical and redirect on same page
Hi Guys, Am I going slightly mad but why would you want to have a redirect and a canonical redirecting back to the same page. For Instance https://handletrade.co.uk/pull-handles/pull-handles-zcs-range/d'-pull-handle-19mm-dia.-19-x-150mm-ss/?tag=Dia.&page=2 and in the source code:- <link href="<a class="attribute-value">https://handletrade.co.uk/d'-pull-handle-19mm-dia.-19-x-150mm-ss/</a>" rel="<a class="attribute-value">canonical</a>" /> Perfect! exactly what it is intended to do. But then this page is 301 redirected tohttps://handletrade.co.uk/pull-handles/pull-handles-zcs-range/d'-pull-handle-19mm-dia.-19-x-150mm-ss/ The site is built in open cart and I think it's the SEO plugin that needs tweaking. Could this cause poor SERP visibility? This is happening across the whole site. Surely the canonical should just point to the proper page and then there is no need for an additional bounce.
Technical SEO | | nezona1 -
What should I do with all these 404 pages?
I have a website that Im currently working on that has been fairly dormant for a while and has just been given a face lift and brought back to life. I have some questions below about dealing with 404 pages. In Google WMT/search console there are reports of thousands of 404 pages going back some years. It says there are over 5k in total but I am only able to download 1k or so from WMT it seems. I ran a crawl test with Moz and the report it sent back only had a few hundred 404s in, why is that? Im not sure what to do with all the 404 pages also, I know that both Google and Moz recommend a mixture of leaving some as 404s and redirect others and Id like to know what the community here suggests. The 404s are a mix of the following: Blog posts and articles that have disappeared (some of these have good back-links too) Urls that look like they used to belong to users (the site used to have a forum) which where deleted when the forum was removed, some of them look like they were removed for spam reasons too eg /user/buy-cheap-meds-online and others like that Other urls like this /node/4455 (or some other random number) Im thinking I should permanently redirect the blog posts to the homepage or the blog but Im not sure what to do about all the others? Surely having so many 404s like this is hurting my crawl rate?
Technical SEO | | linklander0 -
If the order of products on a page changes each time the page is loaded, does this have a negative effect on the SEO of those pages?
Hello, a client of mine has a number of category pages that each have a list of products. Each time the page is reloaded the order of those products changes. Does this have a negative effect on the pages' rankings? Thank you
Technical SEO | | Kerry_Jones2 -
Why do they rank the home page?
We are trying to rank for the key word Motorcycle Parts. We have moved up to page 2 over the past couple months; however, google is ranking our home page not our http://www.rockymountainatvmc.com/s/49/61/Motorcycle-Parts page that is for motorcycle parts. We are working on internal linking to help point the right signals too. Any other thoughts? ( we have new content written to put in as well we just have to wait for an issue to be fixed before we can put it in)
Technical SEO | | DoRM0 -
Too Many On-Page Links
Hello. My Seomoz report this week tells me that I have about 500 pages with Too Many On-Page Links One of the examples is this one: https://www.theprinterdepo.com/hp-9000mfp-refurbished-printer (104 links) If you check, all our products have a RELATED products section and in some of them the related products can be UP to 40 Products. I wonder how can I solve this. I thought that putting nofollow on the links of the related products might fix all of these warnings? Putting NOFOLLOW does not affect SEO?
Technical SEO | | levalencia10 -
What Are The Page Linking Options?
Okay, so I'm working with a site that has pretty good domain authority, but the interior pages are not well linked or optimized. So, it ranks for some terms, but everything goes to the home page. So, I'd like to increase the authority of the interior pages. The client is not wild about spreading targeted juice via something like a footer. They also don't like a "Popular Searches" style link list. The objection is that it's not attractive. They currently use cute euphemisms as the linking text, so like "cool stuff" instead of "sheepskin seat covers." In that made up example, they'd like to rank for the latter, but insist on using the former. What about a slide show with alt text/links? Would that increase the authority of those pages in a term-targeted kinda way? Are there other options? Does it matter how prominent those links are, like footers not as good as something higher up the page? They currently use a pull-down kind of thing that still results in some pages having no authority. Do bots use that equally well? Thanks!
Technical SEO | | 945010