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.
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.
Is this costing your site traffic?
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
- Free audit in 60 seconds
- Fixes drafted for your review
- ChatGPT, Perplexity, Gemini and AI Overviews tracked
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
- Re-check after big site changes
- Keep this page for reference
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
- Follow the steps below
- Top-traffic pages first
- Check again in a month
5 parts, 3 minutes.
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.
Google's four rules for testing
Use rel="canonical"
- What Google says
- Point alternate URLs at the original, which Google prefers over
noindexbecause it "more closely matches your intent in this situation" - Applies to
- Tests with multiple URLs
Use 302, not 301
- What Google says
- A
302tells 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
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
Setting up an alternate-URL test
- 1
Keep the original as the preferred URL
Add
rel="canonical"on each variant URL pointing to the original. - 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
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
End the test and clean up
Roll the winning change into the original URL, then remove the variants, the redirects and the test code.
<link rel="canonical" href="https://www.example.com/pricing" />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.
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.
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.
Every fact, linked and dated.
google.com
- 01Minimize A/B testing impact in Google Search (Google Search Central)developers.google.com · checked 2026-10-25
Keep learning
All glossaryKnow the term. Now check your site.
The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.
- 46 fixes shipped without a ticket Brightpipe
- +212% organic clicks in 90 days Ledgerly