In Cloudflare DNS I have a domain and I want 1% of traffic to go to box` and 99% of traffic to go to box2


In cloudflare DNS we have a domain with a CNAME directing all traffic to heroku. We are moving to AWS and want to test by adding a CNAME to there instead. However, we do not want ALL TRAFFIC going to AWS all at once, but would prefer to slowly make the move over time, keeping both our Heroku and AWS instances alive simultaneously.

Ideally we want to keep things simple and have two CNAME records within cloudflare for our domain. 99% of DNS lookups would resolve to host1 (heroku) but 1% would resolve to host2 (aws).

I was wondering if that’s something I can do with DNS management and CNAMEs within cloudflare, or if I need to come up with some other solution (and honestly not sure what other solution we would use, maybe direct all traffic to cloudfront in AWS and then set this rule up inside there?)


This can’t be done at the DNS level, but you could treat this as A/B Testing and use Cloudflare workers.


there is the Load Balancing option, you can set there weight to each origin


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.