Changing The Default Home Page To A Custom One Using Visual Studios

Blog | Technical
Written By: Nabil OrfaliPublished On: Nov 28 2016

In this tutorial, we will be changing Sitecore’s default homepage to a custom homepage. When you create a Sitecore project, it comes with the website’s configuration and its supporting files. These files load up a default Sitecore homepage which looks like this. 


I will be changing it to this custom Homepage.


In order to change this homepage to a custom homepage that you have created, you would have to modify the Sitecore.config file found in Website/App_Config.


Here are the steps to do so:

1) Make a copy of your website’s Sitecore.config file from Sitecore Rocks into your Solution Explorer which have the corresponding files from your project.

This is needed because when you modify the file in the Solution Explorer, you will not be publishing it automatically to your Live database for your users to publicly see. You will instead, publish to your Master database so you can see if there’s any errors created from your modified configurations. When you make a copy of this file, you want to put it under App_Config.


2) Understanding the Sitecore.config file

In order to find out where we want to modify a couple lines to the Sitecore.config file. There is a specific commented section called SITES which explains how to enable different websites on different domains. The contentStartItem highlighted below will direct us where to compile the website configurations for the homepage.

Tip: I suggest using the search function to find this section


3) Modifying The "website" line in Sitecore.config

Sitecore uses this line to get the default homepage. This is also the line we want to modify the path to your custom homepage. In the startItem parameter, it is currently set to home because of the way the content tree is organized.

This is the default configuration to Sitecore's Homepage.


This is the hierarchy of my content tree.


This is how my looked like after I modified the "website" line highlighted below.


4) Rebuild the Project

After the modification has been made, you want to rebuild the project in the Solution Explorer and Publish it. 

5) Publish the website application

To publish the website, go to the Publish tab in the Sitecore Interface and under Publish, there is a dropdown with options. Select Publish Site. (Publish Tab -> Publish Option -> Publish Site)

6) Go to your homepage!

Type in the URL to your site into the browser and hopefully your site homepage has been changed to your default one!

Enjoy using your custom homepage! If you have any questions, please feel free to leave comments below! :)

About the AuthorNabil Orfali
Nabil OrfaliCEO & Founder, Sitecore Strategy MVP