Create a Site

Creating a new site in Rock is simple. But it helps to do things in the proper order. Following the steps below will lead to a well-configured site every time.

  1. First, navigate to the site list page Admin Tools > Websites
  2. Click the ti ti-circle-plus (add) button at the bottom of the grid of sites.
  3. Fill in the site configuration outlined below:

  1. Name - Provide a name for your site. This name will not appear on the site itself, just the admin screens used to support it.
  2. Description - Provide a description for your site.
  3. Theme - Select a theme for your site. If your theme is not yet ready, we recommend that you pick the Stark theme basic template.
  4. Default Page - 
  5. Login Page - Each site defines its own login page. This page will be used when an unknown user clicks to a page that requires additional security. You do not have to select one at the time of creation. You may wish to configure this later.
  6. Domain(s) - In order for Rock to serve up your site, it needs to know what domains (e.g., www.rocksolidchurchdemo.com) it represents. You can provide multiple domains in this field delimited with a comma.
  7. Error Page - Let's face it, errors happen. Instead of displaying the default Rock error page you can design and show a custom page for your site.
  8. Google Analytics Code - You might want to integrate your site with Google Analytics. Rock makes this simple by allowing you to provide your site's Google Analytics code. We'll do the rest.

Note

Active - Inactive
You can mark web sites inactive. This is handy if you have older websites that you still want to keep around but are not actively being used. Marking them inactive removes them from the site list. There is a filter to allow them to be displayed if needed. An inactive website will still function, it just won't be displayed on the list of sites.

  1. Change Password Page - This setting will determine the page to link to for changing the password.
  2. Communication Page - The Grid uses this setting to determine what page to redirect the user to when clicking the New Communication button at the bottom of a grid of people.
  3. Group Registration Page - The group registration page setting is not yet implemented in Rock.
  4. 404 Page - You have the option to provide a custom 
  5. Require Encryption - This setting will require that all pages on this site load with SSL encryption. If a page is attempted to be loaded with http, Rock will redirect it to https.
  6. Enable Shortening - Should this site be available when creating shortlinks?
  7. Enable Visitor Tracking - If an anonymous (i.e., not logged in) person visits your site, should Rock track how they are interacting with your site? If you're using Rock's Personalization features, you'll want this enabled.
  8. Enable Personalization - Rock's Personalization features help get the right content in front of the right people. For Personalization to work on your site, this option must be enabled. See the Personalization chapter below for details.
  9. Site Icon - If you want your site to have a site icon (aka, 'favicon'), upload it here. The recommended image size is 192x192. Rock will automatically create all of the sizes required by different browsers and devices based on the image you supply. Once uploaded, you can turn the icon on and off for individual pages by checking the Site Icon box in each page's properties, accessed in the Admin Toolbar. Similarly, there's an option to upload a site logo, which some themes use to apply some change to a site. See the theme's documentation for sizing information.
  10. Page Attributes - This is where you can add attributes to the pages of your site. Page Attributes apply to all of the pages of the site, but each page has its own value for each attribute. To learn more, see the Page Attributes section below.

  1. Enable Mobile Redirect - This checkbox enables mobile redirects. This allows you to route your mobile users to a different page or site if they visit any page on this site.
  2. Log Page Views - This setting determines if each page view of this site should be tracked. This allows you to gain valuable metrics about a page AND more importantly about your guests' activities and interests.
  3. Page View Retention Period - If page tracking is enabled, you can set how long the page views are stored. You'll find that for popular sites this data will grow quickly. You may want to limit how much of it you keep.
  4. Allowed Frame Domain(s) - If you need to allow an external site/domain to be able to embed your site (such as in an iframe) just enter each domain as a space delimited list. Rock will then take care of sending the correct page headers that block all sites not in the list. The value you enter here will be used for the <source> as described in Content-Security-Policy frame-ancestors directive.
  5. Page Header Content - The content provided in this field will be added to each page's head section. This is one area where you can do a lot of interesting customization of your site by using page attributes. For more information, see the Page Attributes section below.
  6. Allow Indexing - This setting will enable or disable the pages of the site from being indexed by web indexes such as Google and Bing. If you disable indexing, Rock will add tag in the page header to keep web indexes from crawling your site.
  7. Crawling Starting Location - Provide the URL for the page from which the Rock indexer should start. See the 
  8. Enable Exclusive Routes - If enabled, other sites will not be able to use this site's routes, and routes from other sites will not work on this site. This means the domain in the URL used with the route must match the site's configured Domain(s). If the route is configured as "Is Global" then this setting is ignored.
  9. Disable Predictable Ids - This setting will prevent Rock from accepting simple number Ids when passed into most blocks. For instance, a standard URL like the one below identifies the group by an Id number of 112.

Warning

Allowed Frame Domains
Your Rock URL must also appear in this list otherwise you will lock yourself out of Rock's modal popups (such as the HTML editor, block settings, etc.) Therefore, if you wanted to allow www.yoursite.com to be embedded on www.xyz.com, you would specify the following in your list:http://www.yoursite.com https://www.yoursite.com http://www.xyz.com https://www.xyz.com  

Note

Site Attributes
Attributes can be added to any entity in Rock, including Sites. If you've added any site Attributes, you'll be able to see and provide values for them from the Site Detail block. See the Entity Attributes chapter of the Admin Hero Guide for more details.  

Page Attributes

The Page Attributes section of the Add Site screen is an advanced setting that gives you a ton of control over your layout of your site. The attributes you create here will apply across all of the pages of your site, but each page will have its own attribute value. For example, you create an image attribute for a page, then dynamically access that attribute in your header, as shown in the following sample code:

Set Banner Image
                <script runat="server">
                    protected void Page_Load( object sender, EventArgs e )
                    {
                    var page = ( RockPage ) this.Page;

                    var bannerImage = page.GetAttributeValue( "BannerImage" );
                    headerMainText.InnerHtml = bannerImage;
                    }
                </script>

                <header id="headerMain" runat="server">
                </header>