---
title: "Test page versions without misleading · Agent Wranglers"
url: https://agentwranglers.se/playbook/seo/crawling-and-indexing/ab-testing
id: SEO-77
level: Recommended
updated: 2026-10-22
build: a2a6bdfed830
tokens: 839
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Test page versions without misleading search engines

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Crawling and indexing](https://agentwranglers.se/playbook/seo/crawling-and-indexing.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-22.

- ID: SEO-77
- Level: Recommended
- Chapter: [Crawling and indexing](https://agentwranglers.se/playbook/seo/crawling-and-indexing.md)
- Rule: During an A/B test, show crawlers the same versions visitors get. Point each variant address to the original with `rel="canonical"`, redirect to variants with 302, and remove the test within 14 days of its end.
- Check: A test fetches each variant address and finds a canonical link to the original. Every redirect into a variant answers 302 or 307. The experiment register lists no test that ended more than 14 days ago with its script or variant pages still live.
- How: Never single out Googlebot to always get the original, because that is cloaking, as [Showing crawlers a different page](https://agentwranglers.se/playbook/seo/search-spam-and-penalties/cloaking.md) says. Googlebot generally ignores cookies, so a test keyed on a cookie shows it the default version. That is fine. When variants live at their own addresses, give each a canonical link to the original rather than `noindex`. Send visitors there with a 302 or a script, never a 301, because the test is temporary. Google may treat a test left running longer than needed as an attempt to deceive. Fix the end date before the start, as [Write the experiment plan before it starts](https://agentwranglers.se/playbook/analytics/experiments/experiment-plan.md) says.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### HTTP example

```http
HTTP/2 302
location: https://example.com/pricing-b
cache-control: no-store
```

### HTML example

```html
<!-- On https://example.com/pricing-b -->
<link rel="canonical" href="https://example.com/pricing">
```

## Sources

- [Google Search Central – A/B testing best practices for Search](https://developers.google.com/search/docs/crawling-indexing/website-testing)

## Related rules

- SEO-53 [Showing crawlers a different page](https://agentwranglers.se/playbook/seo/search-spam-and-penalties/cloaking.md) in SEO
- ANA-11 [Write the experiment plan before it starts](https://agentwranglers.se/playbook/analytics/experiments/experiment-plan.md) in Product analytics and experiments

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/seo/crawling-and-indexing/ab-testing">Agent Wranglers SEO playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Keep private pages out of search](https://agentwranglers.se/playbook/seo/crawling-and-indexing/meta-robots.md)
- Next: [Tell search engines what changed](https://agentwranglers.se/playbook/seo/crawling-and-indexing/indexnow.md)
- [Crawling and indexing](https://agentwranglers.se/playbook/seo/crawling-and-indexing.md)
