SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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… – Marius Constantinescu - MVP Dec 27 '12 at 15:54
rjcup3 link helped a lot. Thanks – anantharengan Dec 29 '12 at 4:44
This being the case, I am merging the questions. – SPDoctor Dec 29 '12 at 11:07
up vote 4 down vote accepted

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

share|improve this answer

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.

share|improve this answer
Thanks a lot for the reply. This link from rjcup3… helped a lot. – anantharengan Dec 29 '12 at 5:57

disable the minimal download optimization for the page to correct this and then set the default page from iis - inetmgr.

hope this helps

share|improve this answer
Judging from the flags it isn't helping ;-). People, please post comments if you think the answer is technically wrong, rather than flagging. Thanks. – SPDoctor Feb 7 '13 at 16:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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