How To Set Default Web Page In Umbraco

crjunk picture crjunk · Mar 1, 2012 · Viewed 9.3k times · Source

I've just recently started trying to use Umbraco, so I hope this doesn't sound stupid.

I'm trying to set the default web page to my site, but I am having no luck. I recently installed umbraco v 4.7.1.1, along with the blog starter kit that you can select when using the installation wizard.

In my "Content View", I have the following structure:

Content (folder)

  • Personal Site (folder)
    • Index
    • About
    • MyTestBlog

When I look at the Properties tab for MyTestBlog, the Template property is set to "Blog Post". When I go to www.mytestsite.com, the content on MyTestBlog shows up on the site's default web page.

I have the Template property for the Index page set to "Textpage". I right clicked on the Personal Site folder and selected Sort. From the Sort pop-up window, I dragged Index to the top of the list so that it has the sort order of zero (0).

From what I have read, whatever is set as the first item will be the default web page in Umbraco, but this does not seem to be the case for me. No matter what I try, I cannot get Index to be the default web page for the site.

I have checked to ensure that all of the web pages have been published. Is there something that I am missing or not doing?

Thanks!

Answer

Goran Mottram picture Goran Mottram · Mar 1, 2012

Not a stupid question at all, it's a common stumbling block when first learning Umbraco. I know it tricked me when I started. Your assumptions are correct in that Umbraco will display the first node as the default page, but it's the node Personal Site which is actually the first node.

To fix this, add a property with the alias umbracoInternalRedirectId of data type Content Picker to your Personal Site document type. Then in the content section pick the node you want the Personal Site node to default to (it doesn't even have to be the first subnode).

Normally, you could use a property alias of umbracoRedirect but Umbraco doesn't allow this on the first node without it's problems. umbracoRedirect is safe to use (and generally preferred) for any other node in the site.