Using Proxies with A/B Test

Loving Netlify’s A/B test setup. So simple but so good :slight_smile:

Though, one issue I’m having with them, is that I can’t roll back the test branch.

I’m wondering if using redirect proxies may fix this.

So I would setup 3 Netlify sites, from 2 Repos:

Git repo 1 - Website
Git repo 2 - Request handler

Netlify Site 1 - main.example.com - static site built from main branch Git repo 1
Netlify Site 2 - test.example.com - static site built from b branch of Git repo 1

Netlify Site 3 - example.com
Uses Git repo 2, to handle the requests using proxies:
The repo just has a _redirects file with 2 branches:
main branch: /* https://main.example.com/:splat 200!
test branch: /* https://test.example.com/:splat 200!

Then I can be able to manage the A/B tests in the example.com site.

Would this be a safe approach? Wondering if it might create issues with some of the magic and conveniences Netlify takes care of, such as instant cache invalidation.

Thanks!

Hi @BenSuperscript,

Since it’s an internal Netlify proxy, it would work well.