Redirect website visitors based on their region

What is the name of the domain?

example.com

What is the issue you’re encountering

I want to redirect a website visitors based on their location. If the visitor based on US, I want to redirect them to www.us.example.com website. I have added a Redirect rule, but that is not working. Please check my screenshots as well.

Screenshot of the error

That domain isn’t on Cloudflare, so your redirect rule won’t work for it.

tools.com is the main domain actually

The redirect is working for me:

 % curl -svo /dev/null https://tools.com/cftest 2>&1 | egrep "< |> "
> GET /cftest HTTP/2
> Host: tools.com
> User-Agent: curl/8.6.0
> Accept: */*
> 
< HTTP/2 301 
< date: Wed, 26 Jun 2024 02:26:27 GMT
< content-type: text/html
< content-length: 167
< location: https://us.tools.com
< cache-control: max-age=3600
< expires: Wed, 26 Jun 2024 03:26:27 GMT
< server: cloudflare
< cf-ray: 8999c0a82d992f03-LAX
< alt-svc: h3=":443"; ma=86400

But, When I add a VPN to my PC and changed the Location to USA and check it, its not working.

Did you check it through a VPN ?

I don’t need to. I’m in the US. Really in the US. Isn’t that your goal?

1 Like

That’s actually my goal

Thank you for confirming

1 Like

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