How to block website access on mobile devices?

Nilkanth Nikam 1 Reputation point

Is it possible to block website access/browsing on all mobile phones?

I have already tried HttpContext.Request to check IsMobileDevice and User Agent to cross check browser type.

It does not work when I select chrome option "Request Desktop Site". When I click on "Request Desktop Site" option in mobile chrome then it opens my website.

Is there any way to block access of website on all mobile phones?

A set of technologies in the .NET Framework for building web applications and XML web services.
3,237 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce ( 54,621 Reputation points

    The chrome feature changes the agent string. There is no real way to detect faked agent strings.

    0 comments No comments