When you set up a redirect test, i.e. when you use another URL as a variation, you must take account of search engine optimization. Google can find and index your alternate pages even if you've placed a <meta name="robots" content="noindex, nofollow"> tag in the <head> section of the pages. The risk is therefore that these will replace the original pages in the SERPs (search engine results pages).
So what should you do? The answer is quite simple and given by Google itself in one of its support posts. We'll summarise it here: use the attribute rel="canonical" and not a noindex tag on your alternative pages.
In this post, Google explains that it's pleased you're testing to improve the user experience and sets out guidelines for a redirect test.
There are 5 guidelines:
- No cloaking, in other words showing one set of content to the user and a different set to search engines, for instance using user-agent detection. An example of this would be always serving the original version to search engines. You have nothing to worry about on this score: AB Tasty does not make decisions based on the user-agent Googlebot
- Add the attribute rel="canonical" to all of your alternate URLs and use the original URL as the value of this attribute. Google explicitly recommends using this method rather than placing a <meta name="robots" content="noindex"> tag on alternate pages. This clearly indicates your intention to Google and the fact that the alternates are relatively similar versions of the original and should be treated as such. Google also says that using the noindex tag rather than rel=canonical can lead it to choose one of the alternate versions as the canonical version, which might mean that it appears in the search results, and sometimes that the original version gets dropped.
- Do not block Google's crawl on your alternative page, using for instance the robots.txt file.
- Only run the experiment as long as necessary. Google knows that the time required for a test will vary depending on how much traffic the tested page gets, but says you should avoid running tests for an unnecessarily long time as they may interpret this as an attempt to deceive, especially if you’re serving one content variant to a large percentage of your users.