Google and other major search engines do not discourage A/B testing or personalization. Read more about it in Website testing and Google search.
Google does its utmost to avoid inadvertently penalizing search rankings of websites who employ testing and optimization. To this end, they provide several key pointers to ensure your testing remains as effective as possible and ultimately provides the best user experience.
Cloaking, showing one set of content to humans and a different set to Googlebot, is against Google's Webmaster Guidelines, whether you're running a test or not. Ensure that you're not deciding whether to serve the test or which content variant to serve based on user-agent.
Always serving the original content when you see the user-agent
Googlebot is an example. Remember that infringing Google's guidelines can get your site demoted or removed from Google search results—probably not the desired outcome of your test.
If you run an A/B test with multiple URLs, you can use the
rel="canonical" link attribute on all your alternate URLs to indicate that the original URL is the preferred version. We recommend using
rel="canonical" rather than a
noindex metatag because it more closely matches your intent in this situation.
If you are testing variations of your homepage, you don't want search engines to avoid indexing your homepage. You 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" can sometimes have unexpected effects.
Consider the following example. If for some reason you 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
Run Your Experiment Only 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, update your site with the desired content variation(s) and remove all elements of the test as soon as possible. These testing elements may include alternate URLs or testing scripts and markup. If Google discovers a site running an experiment for an unnecessarily long time, it may interpret this as an attempt to deceive search engines and take action accordingly. This is especially true if you serve one content variant to a large percentage of your users.