I'm developing hotels websites here in Brazil. When the site is done, we do an A/B test with the old version to measure conversion and show to the hotel owner how good our site is.

Due to the fact that I cannot put the old site inside the new one as a sub-resource (newone.com/old), currently I'm doing those A/B tests as follows:

  1. I create 2 Google Analytics accounts, one for each site (old and new);
  2. I put the GA tags in the old website pages (changing its possibly existent GA ID to the just created one);
  3. I put an JavaScript code that redirects the user to the old website (in a different URL and different domain) with 50% of probability.

So I compare all the metrics, events and goals between those two GA accounts.

How bad is this approach? How Google can interpret the fact of being sometimes redirected, sometimes not? The experiment usually runs for 2 weeks.

Is there any other alternative for doing this in a better way?

  • I like the concept except that your results will be tainted by the lack of metrics such as domain age, site rank, SERP performance history, back links, and so on. It is almost like comparing apples and oranges. Still worth pursuing. Especially if your new site out performs the old site. You can bring up the metrics dis-aadvantage the new site has over the old site. That should impress them!
    – closetnoc
    Jun 9, 2014 at 20:09
  • @closetnoc: Thanks for your reply. One point I guess isn't clear in my question is that the website entrypoint is only the new website that can either redirect or not the user to the old site, which isn't indexed by Google. So the lack of metrics doesn't occur. Jun 9, 2014 at 20:21
  • @closetnoc: My question was more like: "will I be punished by Google by doing this?" Jun 9, 2014 at 20:23
  • I don't think so. But I would like to hear other opinions on this.
    – closetnoc
    Jun 9, 2014 at 20:40

3 Answers 3


Really, I think this is the wrong way to go about AB testing. Ideally, you would have metrics on the previous version, and can compare those to data collected on the new version over a reasonable period (30 days should suffice).

There are several A-B testing services out there for websites that allow people (many web developers themselves) to give you actual feedback! Remove the guessing, get direct feedback!

That said.. I'm not sure which version the link sent me to, but it's pretty heavy (long load, and my net is fast). It also is not mobile friendly, which I was under the impression was the dominant device used in many regions with developing infrastructure.

Finally, given it's a resort site, wouldn't it be a good idea to detect the visitors region and translate as appropriate? I'm guessing that many visitors do not speak fluent Portuguese.

  • Thank you for your reply @kcdwayne. I understand your point, but there are some points we have to consider on doing this AB test. Collecting data from the websites in different periods can put a bias on data, once we are dealing with a very time-dependent kind of service (seasons, holidays, etc.). The website you have entered should be the old one. Try clicking on the link once again! :) We are working on the multilanguage feature. I totally agree with you! Jun 9, 2014 at 20:28

Here is a comprehensive article that looks at SEO risks for A/B testing. It recommends that if you do use redirects for A/B testing that you make sure to include link rel canonical tags in all page variants so that search engine bots know that they all represent the same content and know which version to index.

Google has a guide for A/B testing as well. It recommends that if you use redirection as part of your A/B tests, make sure to use 302 temporary redirects rather than 301 permanent redirects. Your javascript redirects would be fine as well.

A/B testing with redirects is fine, but you need to be careful. Specific implementation details are important for SEO.


I think this technique is possibly interpreted by search engine the same as cloaking. I've read you have setup two accounts on Analytics, i suggest to use the experiment feature inside that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.