Split URL Testing: When to Use Redirect Tests Instead of DOM Changes
Most A/B tests change a headline or button color. But sometimes you need to test something more fundamental — a completely different page layout, a redesigned pricing structure, or a checkout flow rebuilt from scratch.
For those cases, DOM patches won't cut it. You need split URL testing (also called redirect testing).
What Is Split URL Testing?
Split URL testing routes different visitors to completely different URLs. Instead of modifying the current page with JavaScript, you:
- Control group: Sees
/pricing(current page) - Variant group: Gets redirected to
/pricing-v2(new design)
Both pages are fully separate — different layouts, different copy, different frameworks if needed. The A/B testing tool handles the routing and tracks which variant each visitor saw.
DOM Changes vs Split URL Testing
| DOM Changes | Split URL Testing | |
|---|---|---|
| How variant is applied | JavaScript modifies elements | Redirect to different URL |
| Complexity of change | Words, colors, layout tweaks | Complete redesigns |
| Dev work | None | New page must be built and live |
| Analytics complexity | Simple | Both URLs generate traffic |
| Flicker risk | Moderate | Low (redirect happens fast) |
| SPA support | Requires MutationObserver | Works naturally |
Use DOM changes for: headlines, CTAs, button colors, element visibility, copy variations.
Use split URLs for: completely different page layouts, testing a Webflow build vs your coded page, checkout flow redesigns, pricing model changes.
The Infinite Loop Problem (and How to Solve It)
The most common technical mistake with split URL testing is creating an infinite redirect loop.
Here's what happens:
- Visitor lands on
/pricing→ assigned to Variant A → redirected to/pricing-v2 /pricing-v2loads → SDK runs → experiment evaluates/pricing-v2URL- If
/pricing-v2matches the experiment URL and Variant A still fires → redirected to/pricing-v2again - Infinite loop
The fix: Session storage guard
const guardKey = `_redir_${experimentId}_${variantId}`
if (sessionStorage.getItem(guardKey)) {
// Already redirected — we're on the destination page
return
}
sessionStorage.setItem(guardKey, '1')
location.replace(redirectUrl) // Use replace(), not assign()
The guard key includes both experimentId and variantId so multiple simultaneous redirect experiments don't interfere with each other.
Using location.replace() instead of location.assign() prevents a new browser history entry, so the back button works normally.
GhostSnip implements this guard automatically.
Setting Up SEO Correctly
When both URLs are publicly accessible, search engines will index both. To avoid duplicate content issues:
Option 1: Noindex on the variant URL (simplest)
<!-- On /pricing-v2 while testing -->
<meta name="robots" content="noindex, nofollow">
Remove this meta tag if/when you make the variant the permanent page.
Option 2: Canonical tag
<!-- On /pricing-v2 -->
<link rel="canonical" href="https://yoursite.com/pricing">
This tells search engines the original URL is the canonical version.
Option 3: Password-protect the variant URL
If your platform supports it, require authentication to access the variant URL during testing. This keeps it out of search indexes entirely.
Analytics Considerations
With split URL testing, both pages appear as separate URLs in your analytics:
/pricing: Control group traffic/pricing-v2: Variant group traffic
Metrics per page will look odd (each page only gets ~50% of what you'd expect). This is correct — don't try to fix it.
For goal tracking: GhostSnip uses sessionStorage to track which experiment variant the visitor was assigned to, so conversion events on /pricing-v2 are correctly attributed to your variant regardless of which URL they occur on.
Step-by-Step: Running a Split URL Test in GhostSnip
- Build your variant page and publish it at the target URL
- Create an experiment in GhostSnip targeting your original URL (e.g.,
/pricing) - In the visual editor, open the Redirect tab
- Enter the variant URL (e.g.,
/pricing-v2) - Set your goal — typically a page visit to your thank-you/confirmation page, or a custom
purchaseevent - Add SEO protection to the variant URL (noindex or canonical)
- Launch the experiment
Within hours, you'll have live traffic split between both pages.
When the Test Concludes
Once you have a winner:
- If control wins: Archive the experiment, redirect the variant URL back to the original (or 301 it), remove noindex tags from the variant
- If variant wins: Make the variant your permanent page (update your CMS/code), 301-redirect the old URL to the new one, run the variant URL without the noindex
Don't just leave both pages live with no redirects — that's how you end up with duplicate content penalties.