Hello, I’m a Cloudflare pro user. I have a website and I want this website not to be accessed from Windows devices. My site is a mobile-only site. How exactly can I do this?
Did you see an example like this? How do I do this?
Do you want your entire website to only be available on mobile, or do you have a separate subdomain (e.g. m.example.com
) that serves a mobile version?
If your intention is the former, you can use WAF Custom Rules to block requests with a specific User-Agent
. For example, you can choose to block User-Agent
s that contain Windows
or Mac OS
.
Do note this will be an incomplete solution, as there will be desktop browsers that don’t match this. Also note that the User-Agent
can easily be spoofed, so do not rely on this for any kind of security.
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.