Country Based Redirect Rule Not Working

Hi there,

I am trying to redirect people who visits my website from a certain country to another subdomain. For example if people visits my website outside of Turkey, I want to redirect them to en.domain.com subdomain.

I created a redirect rule but it seems not working as expected.

What am I doing wrong here?

Thanks,
Emre

Try changing “URI full” to “Hostname” (look at the format example underneath the box).

1 Like

Thanks, I just changed it but it takes a little bit of time to affect it right?

Hey there, it didnt work, do you have any other idea?

Your DNS records are not proxied and are set to “DNS only”. Requests are going direct to your origin and not through Cloudflare so the rule can’t do anything.
https://cf.sjr.org.uk/tools/check?fc4d28fd42bc4206b912d6dc05adf600#dns

Once you’ve fixed that, in your first example you were using www.uzmandata.com and in the second uzmandata.com. It probably should be www.uzmandata.com as uzmandata.com redirects to it first on your origin. Or you can modify the WAF rule to cover both hostnames by using hostname with is in.

1 Like

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