Google Webmaster Central Blog - Official news on crawling and indexing sites for the Google index

Website testing & Google search

Thursday, August 09, 2012 at 8:55 AM

Webmaster level: Advanced

We’ve gotten several questions recently about whether website testing—such as A/B or multivariate testing—affects a site’s performance in search results. We’re glad you’re asking, because we’re glad you’re testing! A/B and multivariate testing are great ways of making sure that what you’re offering really appeals to your users.

Before we dig into the implications for search, a brief primer:
Website testing is when you try out different versions of your website (or a part of your website), and collect data about how users react to each version. You use software to track which version causes users to do-what-you-want-them-to-do most often: which one results in the most purchases, or the most email signups, or whatever you’re testing for. After the test is finished you can update your website to use the “winner” of the test—the most effective content.

A/B testing is when you run a test by creating multiple versions of a page, each with its own URL. When users try to access the original URL, you redirect some of them to each of the variation URLs and then compare users’ behaviour to see which page is most effective.

Multivariate testing is when you use software to change differents parts of your website on the fly. You can test changes to multiple parts of a page—say, the heading, a photo, and the ‘Add to Cart’ button—and the software will show variations of each of these sections to users in different combinations and then statistically analyze which variations are the most effective. Only one URL is involved; the variations are inserted dynamically on the page.

So how does this affect what Googlebot sees on your site? Will serving different content variants change how your site ranks? Below are some guidelines for running an effective test with minimal impact on your site’s search performance.
  • No cloaking.
    Cloaking—showing one set of content to humans, and a different set to Googlebot—is against our Webmaster Guidelines, whether you’re running a test or not. Make sure that you’re not deciding whether to serve the test, or which content variant to serve, based on user-agent. An example of this would be always serving the original content when you see the user-agent “Googlebot.” Remember that infringing our Guidelines can get your site demoted or removed from Google search results—probably not the desired outcome of your test.
  • Use rel=“canonical”.
    If you’re running an A/B test with multiple URLs, you can use the rel=“canonical” link attribute on all of your alternate URLs to indicate that the original URL is the preferred version. We recommend using rel=“canonical” rather than a noindex meta tag because it more closely matches your intent in this situation. Let’s say you were testing variations of your homepage; you don’t want search engines to not index your homepage, you just want them to understand that all the test URLs are close duplicates or variations on the original URL and should be grouped as such, with the original URL as the canonical. Using noindex rather than rel=“canonical” in such a situation can sometimes have unexpected effects (e.g., if for some reason we choose one of the variant URLs as the canonical, the “original” URL might also get dropped from the index since it would get treated as a duplicate).
  • Use 302s, not 301s.
    If you’re running an A/B test that redirects users from the original URL to a variation URL, use a 302 (temporary) redirect, not a 301 (permanent) redirect. This tells search engines that this redirect is temporary—it will only be in place as long as you’re running the experiment—and that they should keep the original URL in their index rather than replacing it with the target of the redirect (the test page). JavaScript-based redirects are also fine.
  • Only run the experiment as long as necessary.
    The amount of time required for a reliable test will vary depending on factors like your conversion rates, and how much traffic your website gets; a good testing tool should tell you when you’ve gathered enough data to draw a reliable conclusion. Once you’ve concluded the test, you should update your site with the desired content variation(s) and remove all elements of the test as soon as possible, such as alternate URLs or testing scripts and markup. If we discover a site running an experiment for an unnecessarily long time, we may interpret this as an attempt to deceive search engines and take action accordingly. This is especially true if you’re serving one content variant to a large percentage of your users.
The recommendations above should result in your tests having little or no impact on your site in search results. However, depending on what types of content you’re testing, it may not even matter much if Googlebot crawls or indexes some of your content variations while you’re testing. Small changes, such as the size, color, or placement of a button or image, or the text of your “call to action” (“Add to cart” vs. “Buy now!”), can have a surprising impact on users’ interactions with your webpage, but will often have little or no impact on that page’s search result snippet or ranking. In addition, if we crawl your site often enough to detect and index your experiment, we’ll probably index the eventual updates you make to your site fairly quickly after you’ve concluded the experiment.

To learn more about website testing, check out these articles on Content Experiments, our free testing tool in Google Analytics. You can also ask questions about website testing in the Analytics Help Forum, or about search impact in the Webmaster Help Forum.

The comments you read here belong only to the person who posted them. We do, however, reserve the right to remove off-topic comments.

26 comments:

Jason Carrasco said...

Does this mean you are going to be rolling out multivariate testing in Google Analytics in the near future?

Dale Smith said...

Let's say for example, you have a BigIP that is doing the internal redirect of a page using the same URL. is using rel canonical in the new content actually going to work?

Susan Moskwa said...

@Jason Carrasco: No, this is just general advice that applies regardless of what testing software you're using.

@Dale Smith: If you're doing internal rewrites, the client (the user or crawler) only ever sees one URL and doesn't know that your server is fetching content from another location, so there's no need to use rel="canonical" because no external users ever see more than one URL for that content.

However, if the URL where the content is coming from is also public and available to users, now there are two URLs that users or crawlers can use to access that content, so you could use rel="canonical" in that case. But if the internal rewrite is just pulling content from a different URL/location that isn't accessible by crawlers or your site's visitors, then there's no need for rel="canonical".

RedCardinal said...

Curiously, Adobe's Test & Target were certainly promoting their service as one that could be used indefinitely to utilise their geotargeting/behavioural targeting mechanisms to serve relevant users.

This would not fit with the point about removing code as soon as the experiment finishes up Susan?

Another issue would be running extremely long-lasting experiments on low traffic sites. I don't believe there was ever any indication that leaving tests running could have negative implications prior to this - what changed?

JohnMc said...

Can you please create a post to teach us how to deal with backlinks from porn and malware-detected sites in out link profile that we haven't created. Thanks!

Abhishek Mishra said...

Thanks Susan Moskwa for your additional information.

Santosh Prasad said...

Information is already available on the web but thanks for putting it at one place :)

artradix.com said...

Thanks for article and example, but for me not many new info...

Alex said...

How to use Canonical in A/B testing will really help to prevent website from Google Panda and Genguin.

Thanks for giving this useful information

karlkratz said...

>> Only run the experiment as long as necessary.

From a conversion optimization perspective, this is a false advice. Testing is a continous process.

Tomini Wololo said...

Indonesian Language Please... :D

Ted Ives said...

Very helpful Susan, I had wondered about this for a long time. I doubt many people have ever thought of using rel=canonical for their tests, it makes perfect sense.

Christopher Skyi said...

If you're running an A/B test in Google Analytics (the 'content -> experiments' section), doesn't Google already know about the original and alternative versions of a page in the experiment and is smart enough not to index both? In this case, do you need to use rel= canonical?

Bob said...

What has happened to the Google opening page search function?
Suddenly when trying to type in a search it quickly defaults to a less user-friendly version which does not allow the user to see what he/she is typing.
This is definitely a disservice to Google users. It just happened int he past week.
Any chance we can revert back to the way it was?

enterprisemobilehub said...

Awesome post! Thanks for sharing!

Einstein said...

Quick question: what about preview screenshots that Google generates? If preview bot is not excluded, Google may inadvertently show variation as the preview in search results?

Joni said...

What if you are going to test a complete new site compared to an old site.

E.g. 50% of the HTTP requests towards the homepage are being (302-)redirected towards the new site (hosted on a subdomain), and 50% ends up on the 'old' site.

Is the canonical still the way to go or should we rather disallow crawlers on the subdomain?

Blurbpoint Media said...

This all discussion has impact on search result pages. Thanks for giving information about A/B testing that method and tips made my work easy.

Susan Moskwa said...

@karlkratz: Testing is a continuous process; I'm not saying you should only run one test on your site. It's fine to run a test, look at the results, then run a different test, and to continue in this fashion. What we recommend against is leaving one test in place long after the results have become statistically conclusive (so that you're no longer learning anything new from the test); or using one's testing software to serve a content "variation" to 100% of visitors for a long time (which could be construed as cloaking if search engines see the original content but all or nearly all human visitors see a single, different, content variation).

@RedCardinal: Hopefully the above answers your question. It's also fine to leave an experiment running if a site has low traffic and it takes a long time to get enough visits to draw statistically significant conclusions about your test. Our stance on this has not changed -- the Google Website Optimizer Help Center had an article for years that said the same thing that this blog post says about leaving experiments running. (The article has been removed since Website Optimizer got folded into Analytics, but our stance hasn't changed.)

Susan Moskwa said...

@Christopher Skyi: Google Search doesn't talk directly to Google Analytics, so no, we don't look at whether you're running an experiment in Analytics and use that to influence our indexing of your site. Using rel="canonical" isn't a requirement, but you can use it while using Content Experiments.

@Joni: As long as you're testing variations of what is essentially the same content (content targeted at the same visitor, filling the same need), this advice applies regardless of whether the variations are on the same domain or a different domain. So yes, I'd recommend using rel="canonical".

Kat with a 1000s tales said...

Does anyone know where the BACK BUTTON went? It is very difficult to go BACK to the last page you were on when the button is a FORWARD. GRRRRR

Rahul Bhandari said...

Consider one URL with version A (as it stands today) and B (alternative).
Suppose the B alternative in my A/B test is built in AJAX and is not able to crawled well by google yet - does putting a no-follow / no -index on the B affect how this URL gets ranked.
Is this considered cloaking?

Susan Moskwa said...

@Rahul Bhandari:
Putting noindex or nofollow on a URL is not considered cloaking.
However, see my bullet point about rel="canonical" (where I talk about why noindex is not the best option). I'd recommend using rel="canonical" in your situation.

Unknown said...

Is it possible to do AB testing on a same page? but with a different querystring?

Vincent said...

Dear Ms. Moskwa,

I'm a bit confused.

As I understand it right, here you don't forbid Cloaking basically:
https://support.google.com/analytics/bin/answer.py?hl=en&answer=2576845&topic=1745207&ctx=topic

My situation:
AB-Test with www.exmple.com and www1.example.com
50% of the Users are redirected with 302 to www1.example.com

I set canonical at www1.example.com/abc/ to www.example.com/abc/

But if your crawler comes along www.example.com he gets (maybe, with a 50% chance) redirected to www1.example.com

So it's impossible (maybe, 50% chance) for your crawler to get the canonical content.

Regards,
Vincent.

Shashank Bhattarai said...

My Website is still not ranked in Google and its already 2 weeks since i opened my new blog. Please anybody from google here check one. http://www.thetipsandtricksblog.com

When i Check it still says NA