Skip to the content
Start free

A/B testing

A/B testing is a way to compare two versions of a page, email or listing by showing each to a random share of real visitors and measuring which one gets more of the result you want. Version A is the control, the page as it is now. Version B is the change. The numbers decide, not opinions. Done carelessly on a website, it can confuse search engines, so the method matters as much as the idea.

What is A/B testing? #

Google’s guide to website testing and Google Search describes A/B testing as testing two or more variations of a change. It calls testing more than one type of change at the same time multivariate testing. In both cases visitors are split at random, so the only steady difference between the groups is the version they saw.

The thing you measure is your goal: a sale, a sign-up, a click on a call to action, an added-to-basket event. That makes A/B testing the core method of conversion rate optimisation. It turns “I think a green button is better” into a number you can check.

A/B tests change what is on your pages, and search engines crawl those pages during the test. Google says a well-run test is fine. It also sets four rules in the same guide:

  • No cloaking. Do not show one set of URLs to Googlebot and another to people. Google says this breaks its spam policies even during a test.
  • Use rel=”canonical” on every alternate URL, pointing at the original. Google prefers this to noindex, because it groups the near copies without removing the original from search.
  • Use a 302, not a 301, if you send visitors from the original URL to a test URL. A temporary redirect keeps the original indexed. See 301 vs 302.
  • Run it only as long as needed. When the test ends, ship the winner and remove the test URLs, scripts and markup. A test left running for months, with most people seeing one version, can look like an attempt to deceive.

Tests can also be about search itself. You can test title tags or meta descriptions on groups of similar pages and compare click-through rate in Search Console. That is a page-group test over time, not a visitor split, and it needs more care because rankings move for other reasons too.

Why does it matter for AI answers? #

AI assistants and their crawlers read whatever version they are served. If your test swaps prices, claims or product facts, an assistant may copy the losing version into an answer and keep it for weeks. Test layout, wording and order freely. Keep the facts the same in every version, and keep schema markup matching what each version shows. A bot should never be the only visitor that always sees B. That is the same cloaking risk in a new form, and a reason to watch which AI crawlers hit your test URLs.

How does it work, step by step? #

  1. Pick one goal. One main number, such as completed orders per visitor.
  2. Write a hypothesis. “Putting delivery cost above the fold will raise checkout starts, because people leave when they find it late.”
  3. Change one thing for a simple A/B test. Change several only if you mean to run a multivariate test and have the traffic for it.
  4. Decide the sample size and length first. Low-traffic pages need weeks, not days. Run full weeks so weekdays and weekends both count.
  5. Split traffic at random and keep each visitor in the same group on return visits.
  6. Wait for a clear result. Look at the confidence level, not just which line is higher today.
  7. Ship and clean up. Make the winner the normal page and remove the test code.

What tools run A/B tests? #

Google Optimize was the free choice for many small sites. Google’s Optimize sunset notice says Optimize and Optimize 360 stopped on 30 September 2023. Google said it was working on integrations with AB Tasty, Optimizely and VWO, and opened its APIs so other testing tools can link to Google Analytics 4.

App stores have their own built-in tests. Google Play’s store listing experiments let you compare up to 2 variants with your current listing, judged on install or open clicks. Experiments stop by themselves after 6 months. Apple’s product page optimisation lets you test up to 3 treatments of icons, screenshots and preview videos for up to 90 days. Apple suggests waiting until a treatment performs better or worse than the original with at least 90% confidence.

A worked example #

A UK online shop sells handmade candles and sees many people leave the product page. The owner tests one change: a line under the price that says “Free UK delivery over £40” (B) against the current page with delivery details at the bottom (A).

Both versions live on the same URL. A script decides which one each visitor sees, and Googlebot gets the page the same way as anyone else. After 4 full weeks the report shows B with more basket adds per visitor and a confidence level the owner set as the bar before starting. The owner makes B the normal page, removes the script and checks that the product structured data still matches the visible price. Nothing about the URL or canonical changed, so search sees one stable page.

Common mistakes #

  • Stopping early. Checking every day and stopping on the first good day picks up noise, not a real win.
  • Too little traffic. A page with 50 visits a week cannot show a small change. Test bigger ideas or busier pages.
  • Testing many things at once and calling it A/B. You will not know which change did the work.
  • Counting bots as visitors. Crawlers in the data dilute both groups. See bot traffic in analytics.
  • Using a 301 or noindex on test URLs, against Google’s advice.
  • Different facts in each version, such as a lower price in B only.
  • Leaving old test code live, which slows the page and can hurt Core Web Vitals.

How to check it #

Questions #

Does A/B testing hurt SEO? #

Not if you follow Google’s four rules: no cloaking, canonical on variants, 302 for redirects, and end the test on time.

How long should a test run? #

Until it reaches the sample size you set at the start, and at least full weeks. There is no single right number of days.

What is a good result? #

One where the confidence level clears the bar you chose before you began, on the goal you chose before you began.

Sources #

Updated 24 November 2026 by URSY.com.

Cite this page: A/B testing. URSY. Updated 26 November 2026. https://ursy.com/wiki/ab-testing/ · Section links

Tools for this

All 871 wiki entries, A to Z →