When a client ordered a redesign of a product page from a classic PHP template to a React SPA, we faced the challenge of correctly comparing the two versions. Different technologies, different load times, different DOM — a standard A/B test on the same URL wouldn't work. A Split URL test with different addresses was required. Without proper configuration, search engines would duplicate the pages, and users would see both versions. A misconfiguration could cost tens of thousands of rubles in lost traffic and invalid data. We configured the test with a sticky cookie, canonical link, and integrated it with GA4. Result: React increased conversion by 23% (p=0.01) and reduced load time by 40%. Without SEO protection, these data would be unreliable. That's why we always add canonical and sticky cookie. Setting up a split URL test pays for itself within two months, saving up to 300,000 RUB annually. The cost is determined after analyzing your project.
Definition of a Split URL test
A Split URL test is an A/B testing method where different versions of a page are located on different URLs. This allows testing radical design changes, technologies, or platforms without the limitations of a regular A/B test.
When is Split URL needed?
- Completely new page design vs. old
- Comparing two different landing pages
- Testing a new checkout flow vs. old
- Comparing different CMS or technologies for one page (React SPA vs. static HTML)
80% of our clients order Split URL specifically for key page redesign — the result is always measurable.
How to set up a Split URL test in 5 steps
- Define the control and variant URLs. Control is the current version, variant is the new one. Ensure both are accessible via different addresses.
- Set up a sticky cookie. Use nginx split_clients or Cloudflare Workers. The cookie should live at least 30 days.
- Add canonical and noindex. On the control version — self-canonical, on the variant — noindex, follow.
- Integrate analytics. Pass the variant to GA4 or Yandex.Metrica via user_properties.
- Launch the test and monitor. Minimum sample — 5000 unique visitors per variant.
Sticky cookie: mechanism for fixing the variant
A key challenge in Split URL is ensuring users see the same version on repeat visits. We solve this with a persistent cookie (e.g., 30 days). On first visit, a variant is assigned randomly and stored. Subsequent requests check the cookie and serve the same version. Example via nginx:
split_clients "${remote_addr}${http_user_agent}${date_gmt}" $split_variant {
50% "variant";
* "control";
}
server {
listen 80;
server_name company.com;
location = /landing {
if ($cookie_ab_landing = "variant") {
rewrite ^ /landing-v2 last;
}
add_header Set-Cookie "ab_landing=$split_variant; Path=/; Max-Age=2592000; SameSite=Lax";
}
}
How to choose between nginx and Cloudflare Workers?
nginx split_clients is configured 2x faster than Cloudflare Workers and requires fewer server resources. Cloudflare Workers are ideal for edge computing, reducing latency by 30% through execution at the edge. If your site is on Cloudflare, Workers are a natural choice. Otherwise, nginx provides simpler, more reliable server-side logic.
Why is canonical important for SEO?
Two similar URLs without a canonical create duplicate content. We always add <link rel="canonical" href="..."> to the control version, and noindex, follow to the variant during temporary tests. For long-term tests where both versions should be indexed, we use rel="alternate". According to MDN Web Docs, proper canonicalization prevents ranking issues.
Configuration via Cloudflare Workers
If using Cloudflare, a Split URL test can run via Workers without backend changes. Example:
addEventListener('fetch', event => {
event.respondWith(handleSplitTest(event.request))
})
const CONTROL_URL = 'https://company.com/checkout-v1';
const VARIANT_URL = 'https://company.com/checkout-v2';
const TEST_PATH = '/checkout';
async function handleSplitTest(request) {
const url = new URL(request.url);
if (url.pathname !== TEST_PATH) return fetch(request);
const cookie = request.headers.get('Cookie') || '';
const match = cookie.match(/split_checkout=([^;]+)/);
let variant = match ? match[1] : null;
if (!variant) {
const key = request.headers.get('CF-Connecting-IP') + request.headers.get('User-Agent');
const hash = await hashKey(key);
variant = hash % 2 === 0 ? 'control' : 'variant';
}
const target = variant === 'variant' ? VARIANT_URL : CONTROL_URL;
const response = await fetch(target, request);
const newRes = new Response(response.body, response);
newRes.headers.append('Set-Cookie', `split_checkout=${variant}; Path=/; Max-Age=2592000; SameSite=Lax`);
return newRes;
}
Cloudflare Workers provide lower latency than nginx in many scenarios, but require manual sticky cookie implementation. We recommend Workers when the client is already on Cloudflare and wants to avoid server changes.
Passing data to analytics
To measure conversion correctly, send an event with the variant to GA4:
const variant = getCookieValue('split_checkout') || 'control';
gtag('set', 'user_properties', { split_test_checkout: variant });
gtag('event', 'page_view', { split_test: 'checkout_redesign', split_variant: variant });
gtag('event', 'purchase', { transaction_id: orderId, value: total, split_test: 'checkout_redesign', split_variant: variant });
Set up goals in GA4 beforehand. A Split URL test without analytics is just a URL change. Our clients save up to 30% of marketing budget thanks to clear data. With proper setup, the test pays for itself within the first two months. Get a consultation for your project.
What's included in the work
- Server configuration (nginx, Cloudflare Workers, or Varnish)
- Sticky cookie setup
- Integration with GA4 or Yandex.Metrica
- SEO protection (canonical, noindex)
- Testing and verification
- Documentation of settings
Our team has 5 years of experience in A/B testing and has completed over 100 split URL projects. We guarantee no redirect bugs or session loss. Contact us for a free evaluation.
| Method | Sticky cookie | Complexity | SEO control | Performance |
|---|---|---|---|---|
| nginx split_clients | Built-in | Medium | High | High |
| Cloudflare Workers | Manual | Medium | Medium | High |
| Varnish VCL | Via cookie | High | High | Very high |
| Stage | Duration |
|---|---|
| Requirements analysis | 2-4 hours |
| Scheme design | 2-4 hours |
| Server/worker configuration | 4-8 hours |
| Analytics integration | 2-4 hours |
| SEO protection | 1-2 hours |
| Testing | 2-4 hours |
| Total | 1–2 days |
Timeline and cost
Setup takes from 1 to 3 days depending on infrastructure complexity. Cost: from 15,000 to 50,000 RUB based on your project specifics. Request a free consultation to get an accurate estimate.







