SEO glossaryA/B testing compares two versions of a page or element by showing each to part of your visitors and measuring which performs better.
A/B testing, also called split testing, is a controlled experiment on a live website. Visitors are randomly divided into two groups: one sees the current version of a page (the control, A), the other sees a changed version (the variant, B). Both run at the same time, and the version that produces more of the outcome that matters, such as sign-ups, sales, or clicks on a button, wins.
Because both groups arrive at the same time from the same traffic, outside factors like seasonality or a newsletter going out affect them equally. That is what makes an A/B test more trustworthy than changing a page and comparing this month with last month.
How it works
- Start with a hypothesis. For example: "Moving the price above the fold will increase checkouts, because visitors currently scroll past the buy button looking for it."
- Change one thing. A headline, a button label, a form length, or an image. If several things change at once, there is no way to tell which one made the difference.
- Pick one primary metric before the test starts, usually a conversion rate, and decide how large a difference would be worth acting on.
- Split traffic randomly and keep each visitor in the same group for the whole test, so returning visitors do not flip between versions.
- Run until the sample is large enough, then read the result. Testing tools report statistical significance, which shows how unlikely a difference this large would be if the two versions actually performed the same.
Why it matters
- It gets more from existing traffic. Raising the conversion rate of a landing page grows results without paying for more visitors.
- It replaces opinion with evidence. Design debates about button colors or long versus short copy can be settled by what visitors actually do.
- It lowers the risk of change. A redesign can quietly hurt conversions; testing changes in increments shows the effect before it reaches every visitor.
- It finds friction. Losing variants are useful too: they show which parts of a page, such as an unclear call to action or a confusing checkout step, stand between visitors and their goal.
A/B, split URL, and multivariate tests
A classic A/B test changes elements on the same URL. A split URL test sends visitors to two different URLs, which suits full page redesigns. A multivariate test changes several elements at once and measures every combination; it can reveal how elements interact but needs far more traffic to reach a reliable result.
A/B testing and SEO
Google supports testing and has published guidance so experiments do not harm rankings:
- Do not cloak: show Googlebot the same variants that people can see, and never treat it differently based on its user agent.
- On split URL tests, add a
rel="canonical"link on the variant pointing to the original URL. - If the test redirects visitors to a variant, use a temporary 302 redirect, not a permanent 301.
- End the test when it is done and publish the winner, rather than leaving an experiment running indefinitely.
A/B testing on a WordPress site
Google Optimize, once the common free option, was shut down in September 2023. WordPress sites now use a testing plugin that creates variants inside the editor or a dedicated testing service that inserts a script. Either way, connect the test to Google Analytics 4 or the conversion events already being tracked, and check that page caching does not serve every visitor the same version. Some caching setups need the testing tool to run in the browser or to be excluded from the cache.
Common mistakes
- Stopping early. Checking daily and ending the test the moment one version pulls ahead produces false winners. Decide the sample size in advance and run for at least one or two full weeks to cover weekday and weekend behavior.
- Testing on too little traffic. A page with a handful of conversions a week may never reach a reliable result; test bigger changes or higher-traffic pages instead.
- Testing trivia. Small cosmetic tweaks rarely move results. Changes to the offer, the headline, or the amount of effort a form asks for usually matter more.
- Ignoring segments. A variant can win on desktop and lose on mobile. Check the main segments before rolling out.
Source: Google Search Central, website testing and Google Search.