Free auditStart free
GlossaryGlossary · Measurement

A/B testing

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 withChatGPTClaudePerplexityGoogleAI Mode
01Explained

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 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.

03How 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. 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" />
04Worth 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 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.

05Explained

Measuring the result

Pick one metric per test, such as conversion rate on a landing page or 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.

01What 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.

02Does 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 or ranking.

03Should I use noindex or canonical on test variants?

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

04How 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. 01Minimize A/B testing impact in Google Search (Google Search Central)developers.google.com · checked 2026-10-25
Free · 2 minutes

Know the term. Now check your site.

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

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly