Redirect url basic on country (dynamic url)

hi, how to make redirect to different dunamic url based on country using rules? , my case is
without redirection , https:// domain .com , and I want to redirect it to “https:// domain .com/in/” when accessing form specific country, and dynamic urls like "” should redirect to “”. ive gone through a tutorial in YouTube , but after configuring this , its showing like
please help me to solve this.

Going to need more context here. What are you using here? Page Rules? Bulk Redirects? Transform Rules (i.e. rewrite, not redirect)?

1 Like

im using page rules and transform rules, I followed this tutorial " Using Cloudflare Rules to Redirect Some Countries - YouTube "
but im looking for any model that works the way inorder to force different website on different countries , nor static but dynamic redirect , if we open a specific page url from a country , and that should redirect to the same page of the second website which is available to the country

hi, please help me regarding this

Just so I understand; you have a master domain, You want:

  • Visitors from the UK to to be redirected to,
  • Visitors from France to to be redirected to,
  • Visitors from Germany to to be redirected to

If so, you’re best option is to deploy a Cloudflare Worker:


[quote=“deepak.r, post:6, topic:346456, full:true”]

yes exactly, but also a dynamic URL like if a visiter views a URL from the UK should redirect to

@smarsh , I tried, but it only redirects to static url ,
I setup like
const countryMap = {
IN: ‘’,
EU: ‘’,

and when I use url " " from india, it just redirected to " "
but what I exactly want is to redirect to" "