How to redirect users to


When they enter http://serverName/default.aspx

The first url opens root site, which shows all the contents in SharePoint Site. But I want users to be able to see only pages defined inside Page/default.aspx not the default Sharepoint root site.

Is there any out of box feature to solve this problem?

Thanks in advance.


Below are four ways to set another page as your home page: (all four work for both 2007 and 2010)

  1. From Site Settings (If the publishing features are enabled)

  2. From SharePoint Designer

  3. From code / API

  4. From PowerShell

The first two can be used by Site Owners, the second two can only be used for developers and administrators.

Site Settings (if the publishing features are enabled for a site):

Site Actions, Site Settings, Welcome Page

SharePoint Designer:

Right-click the new page and click “Set as Home Page”. (For SharePoint 2007 this only appears to work from SharePoint Designer if the file is in the root of the site. I.e. the same place as default.aspx.)


C# and VB developers can use the SPFolder.WelcomePage property. See:


PowerShell: for SharePoint 2010:

$site = Get-SPSite http://yourserver/sites/yoursite

$web = $site.RootWeb   (or $web = $site.OpenWeb(“yoursubsite”)

$folder = $web.RootFolder $folder.WelcomePage = “SitePages/home.aspx”

(or  $folder.WelcomePage = “default.aspx”)

(or  $folder.WelcomePage = “Shared%20Documents/mycustomwebpartpage.aspx”)




for SharePoint 2007 (the first two lines are different):


$site = New-Object Microsoft.SharePoint.SPSite(“http://yourserver/sites/yoursite“)

$web = $site.RootWeb

(or $web = $site.OpenWeb(“yoursubsite”)

$folder = $web.RootFolder $folder.WelcomePage = “SitePages/home.aspx”

(or  $folder.WelcomePage = “default.aspx”)

(or  $folder.WelcomePage = “Shared%20Documents/mycustomwebpartpage.aspx”)


$web.Dispose() $site.Dispose()

The simpler way to do is to set your landing page as "Serverurl/pages/default.aspx" and in the "serverurl/default.aspx" , add a content editor to redirect to home url by inserting a script .

You can set persmissions or delete the page which you want to hide it from all users .

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.