# A/B testing

> What A/B testing is and Google

Canonical: https://scaplet.com/glossary/a-b-testing

Glossary Glossary · Measurement

What A/B testing is and Google's documented rules for running tests without hurting Search: no cloaking, rel=canonical, 302 redirects and test duration.

3 min

read

1

sources

Oct 23, 2026

updated

Scaplet Editorial Team

author

In one line

A/B testing compares two or more variations of a single change, such as a button color, to see which performs better with users. Google lists four best practices for avoiding bad effects on Search while testing: don't cloak, use rel="canonical" on alternate URLs, use 302 redirects rather than 301s, and run the experiment only as long as necessary.

30-second check

## Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fa-b-testing%20(%22A%2FB%20testing%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fa-b-testing%20(%22A%2FB%20testing%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fa-b-testing%20(%22A%2FB%20testing%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fa-b-testing%20(%22A%2FB%20testing%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

On this page

## 5 parts, 3 minutes.

1. [What A/B testing is 01](#what-a-b-testing-is)
2. [Google's four rules for testing 02](#google-s-four-rules-for-testing)
3. [Setting up an alternate-URL test 03](#setting-up-an-alternate-url-test)
4. [Mistakes to avoid 04](#mistakes-to-avoid)
5. [Measuring the result 05](#measuring-the-result)

_01_Explained

## What A/B testing is

Google's documentation on website testing describes it as experimenting with different versions of your site to gather data on user behavior. It separates two kinds: A/B testing compares variations of a single change, for example a button's font or color, and [multivariate testing](/glossary/multivariate-testing) tests multiple types of changes at once to see individual and combined effects.

Tests can send users to alternate URLs, or show variations on the same URL with JavaScript. The SEO rules differ slightly between those two setups, as the table below shows.

_02_At a glance

## Google's four rules for testing

Rule

### Don't cloak

What Google says

Showing [Googlebot](/ai-crawlers/googlebot) different content than users is [cloaking](/glossary/cloaking), which "is against our spam policies"

Applies to

All tests

Rule

### Use `rel="canonical"`

What Google says

Point alternate URLs at the original, which Google prefers over `noindex` because it "more closely matches your intent in this situation"

Applies to

Tests with multiple URLs

Rule

### Use 302, not 301

What Google says

A `302` tells search engines the redirect is temporary: it "will only be in place as long as you're running the experiment"

Applies to

Tests that redirect to variant URLs

Rule

### Run it only as long as necessary

What Google says

Remove all test elements as soon as possible after you conclude. Google may interpret a site running an experiment for an unnecessarily long time as an attempt to deceive search engines

Applies to

All tests

_03_How it works

## Setting up an alternate-URL test

1. 1

### Keep the original as the preferred URL

Add `rel="canonical"` on each variant URL pointing to the original.
2. 2

### Redirect test traffic with a 302

Send the share of visitors in the test to the variant with a [temporary redirect](/glossary/302-redirect). Google says JavaScript-based redirects are also acceptable.
3. 3

### Serve Googlebot the same rules as users

Don't single out Googlebot. Google notes it generally doesn't support cookies, so it sees only the version available to a browser that rejects them.
4. 4

### End the test and clean up

Roll the winning change into the original URL, then remove the variants, the redirects and the test code.

On a variant URL

```
<link rel="canonical" href="https://www.example.com/pricing" />
```

_04_Worth knowing

## Mistakes to avoid

### Bot-specific content

Serving Googlebot one variant and users another is cloaking, whether you're running a test or not.

### A 301 to the variant

A [permanent redirect](/glossary/301-redirect) tells search engines the move is permanent, which a test isn't.

### Leaving the test up

Don't let a finished test sit on the site. Google says to remove test elements as soon as possible.

### Cookie-only logic

A test that depends on cookies may not show Googlebot what you expect.

**Set an end date first**Decide the stop condition before you launch, whether a date or a sample size, and put a reminder to remove the test code on the calendar. The duration rule is the easiest one to break by neglect.

_05_Explained

## Measuring the result

Pick one metric per test, such as [conversion rate](/glossary/conversion-rate) on a [landing page](/glossary/landing-page) or [click-through rate](/glossary/click-through-rate) on a title. Google's documentation covers how to run tests safely for Search. It says the time a reliable test needs varies with factors like your conversion rates and traffic, and that a good testing tool tells you when you've gathered enough data. It doesn't give a visitor count, so rely on your testing tool for that.

Questions

## Asked a lot.

4 questions people ask next, answered from the sources on this page.

_01_ What do you mean by A/B testing?

Comparing variations of a single change, such as a button font or color, to see which one users respond to better. Google contrasts it with multivariate testing, which changes several things at once.

_02_ Does A/B testing hurt SEO?

Google's guidance is meant to avoid bad effects on Search: no cloaking, rel="canonical" on alternate URLs, 302 redirects, and removing the test promptly. Google also says small changes like a button's size or color often have little or no impact on a page's [snippet](/glossary/snippet) or ranking.

_03_ Should I use noindex or canonical on test variants?

Google recommends rel="canonical" because it more closely matches your intent in this situation.

_04_ How long should an A/B test run?

Only as long as necessary. The time varies with your conversion rates and traffic. Google says a site running an experiment for an unnecessarily long time may be read as an attempt to deceive search engines.

Sources · 1

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- google.com

1. 01 [Minimize A/B testing impact in Google Search (Google Search Central)](https://developers.google.com/search/docs/crawling-indexing/website-testing) developers.google.com · checked 2026-10-25

## Keep learning

[All glossary](/glossary)

[Learn Conversion rate optimization (CRO) Measurement](/glossary/conversion-rate-optimization) [Related Cloaking Quality and policies](/glossary/cloaking) [Read next Multivariate testing Measurement](/glossary/multivariate-testing) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in glossary
[302 redirect](/glossary/302-redirect) [410 Gone](/glossary/410-gone) [A record (DNS address record)](/glossary/a-record) [Above the fold](/glossary/above-the-fold)

More in Measurement
[Performance report](/glossary/performance-report) [Pogo sticking](/glossary/pogo-sticking) [Rank tracking](/glossary/rank-tracking) [Referral traffic](/glossary/referral-traffic) [Reporting identity](/glossary/reporting-identity) [Retention rate](/glossary/retention-rate) [SEO KPIs](/glossary/seo-kpis) [SEO ROI](/glossary/seo-roi) [Server-side tagging](/glossary/server-side-tagging) [Session recording](/glossary/session-recording) [Share of voice](/glossary/share-of-voice) [UTM parameters](/glossary/utm-parameters) [A/B testing](/glossary/a-b-testing) [Active users](/glossary/active-users) [ARR (annual recurring revenue)](/glossary/arr) [Attribution](/glossary/attribution) [Average position](/glossary/average-position) [BigQuery export](/glossary/bigquery-export) [Bot traffic](/glossary/bot-traffic) [Bounce rate](/glossary/bounce-rate) [Bulk data export](/glossary/bulk-data-export) [Burn rate](/glossary/burn-rate) [CAC payback](/glossary/cac-payback) [Churn rate](/glossary/churn-rate)

Terms on this page
[Multivariate testing](/glossary/multivariate-testing) [Cloaking](/glossary/cloaking) [302 redirect](/glossary/302-redirect) [301 redirect](/glossary/301-redirect) [Conversion rate](/glossary/conversion-rate) [Landing page](/glossary/landing-page) [Click-through rate](/glossary/click-through-rate) [Search snippet](/glossary/snippet)

Free · 2 minutes

## Know the term. _Now check your site._

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **+212%** organic clicks in 90 days Ledgerly
