How to disable mobile browsing for a single website in SharePoint 2010 without disabling all of websites in SharePoint?

As far as I know we can disable it as described here or here. But when applying those instructions, mobile browsing disabled for all of the websites in SharePoint. What I want is to disable it only for a single website like "mydomain.com/sites/mysite"


I guess you can achieve this with PowerShell script,

#Disable Mobile Redirection for all browsers for a given web application

param( [Parameter(Mandatory=$true, ValueFromPipeline=$true, Position=0)] 

# SharePoint cmdlets
Add-PSSnapin Microsoft.SharePoint.PowerShell
if([Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")-eq$null){throw "Unable to load Microsoft.SharePoint.dll";}

$WebApp = $WebApplication.Read()

$configMod1 = New-Object Microsoft.SharePoint.Administration.SPWebConfigModification
$configMod1.Path = "configuration/system.web"
$configMod1.Name = "browserCaps"
$configMod1.Value = '<browserCaps><result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /><filter>isMobileDevice=false</filter></browserCaps>'
$configMod1.Sequence = 0
$configMod1.Owner = "contoso\administrator"
## SPWebConfigModificationType.EnsureChildNode -> 0
$configMod1.Type = 0

$WebApp.WebConfigModifications.Add( $configMod1 )



Remove-PsSnapin Microsoft.SharePoint.PowerShell

got this script from this article:


Hope this helps!

  • 1
    If this script works,it is for disabling mobile browsing for all websites in a web application in SharePoint.But i want disable mobile browsing for a single website in a web application not all of the website.
    – Khosro
    Oct 2 '13 at 12:40

You can use media query to identify the mobile device, then use the javascript to redirect the site to specific page saying access denied.

It should be done in a master page.


One possible solution is to add a http redirect only for the sub site in web.config using location settings, if you have access to web.config


<location path="subsite/_layouts/mobile">
      <httpRedirect enabled="true" exactDestination="true" httpResponseStatus="Found">
        <add wildcard="*" destination="/subsite" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.