Here's the issue. I have a custom landing page that's deployed to "_layouts/myfeaturename/home.aspx" The problem is, how do I map this as the default landing page?

If you click on the top node in the drop down from the little folder icon with the arrow:


it takes you to domain/default.aspx . How can I redirect this page to the _layouts/myfeaturename/home.aspx page (since domain/default.aspx should be unused and non-accessible) or set the default landing page to the home.aspx?

It's my understanding that you can't just edit the default.aspx file because it's virtualized as the default landing of every STS site you create.

I tried the PowerShell method outlined here:


but that didn't work. When I "echo $folder" it says the landing page is _layouts/myfeaturename/home.aspx, but it doesn't navigate there.

Any help would be rad, and very much appreciated.

  • You say the page does not load, but you don't give any details about what does happen. Do you get an error or does the default page load regardless? – Robert Kaucher Mar 16 '12 at 19:08
  • I mean home.aspx isn't navigated to... I'll edit. – RJ Cuthbertson Mar 16 '12 at 19:56
  • I believe you question is already answered by this post sharepoint.stackexchange.com/questions/38419/… – Marius Constantinescu - MVP Dec 27 '12 at 15:54
  • This being the case, I am merging the questions. – SPDoctor Dec 29 '12 at 11:07
  • disable the minimal download optimization for the page to correct this and then set the default page from iis - inetmgr. hope this helps – amit Feb 5 '13 at 11:21

SharePoint requires the WelcomePage to be a sitepage (not in _layouts), if it isn't it'll use default.aspx, so you have to introduce a redirect page as I suggest as answer to the question Change default site in Sharepoint foundation

Or you can just use Sharepoint Designer to give default.aspx the content I suggest for redirect.aspx


After a fresh deployment, verify that you can physically browse to ".../_layouts/CustomPages/Home.aspx." If you are able to browse the page then you know that it was successfully deployed.

Your code to set the welcome page looks sound and matches up to an answer on a related question (an answer with seven upvotes at the time of writing). A couple of troubleshooting steps:

  • Add some error handling and logging to get more visibility. You don't mention any errors in your question, but be certain that none are being thrown.
  • Use SharePoint Manager (be sure to download the correct version) to compare relevent properties before and after your feature receiver code runs.
  • It probably doesn't matter at all but try lower casing the "l" in "_Layouts." Leave nothing to chance with SharePoint development...

What you don't mention is what kind of sites you are activating this feature on; I'm assuming publishing sites; the structure of the welcome page URL can depend on the type of web you're dealing with (site-relative or folder relative). See MSDN.


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.