Kentico CMS 6.0 Developer's Guide

Search engine optimization

Search engine optimization

Previous topic Next topic Mail us feedback on this topic!  

Search engine optimization

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

Search engine optimization (SEO) is a process which attempts to place a website earlier (higher) in search engine results and thus attract more visitors. Kentico CMS has several settings which can be useful when optimizing websites.
 
SEO related settings can be configured at Site Manager -> Settings -> URLs and SEO. The following table contains these settings and provides descriptions:
 

Google sitemap URL

URL that will be automatically rewritten to the physical location of the Google Sitemap. The physical location is ~/CMSPages/GoogleSiteMap.aspx. More information can be found at Google Sitemap.

Allow permanent (301) redirection

If enabled, the system uses permanent (301) redirection instead of standard (302) redirection for SEO purposes.

Use URLs with trailing slash

Specifies how URLs with trailing slash should be handled. Possible options: Leave the URL as is, Always use URLs with trailing slash, Always use URLs without trailing slash.

Redirect document aliases to main URL

If enabled, every document always has only one valid URL and other aliases are redirected to this main URL, for SEO purposes.

Redirect invalid case URLs to their correct versions

Checks the URL letter case, and if configured, redirects to their correct version. Options: Do not check the URLs case, Use the exact URL of the document, Redirect all requests to lower case URLs, Redirect all requests to upper case URLs.

Use language prefix for URLs

If enabled, all document URLs will be generated with language prefixes. The language prefix is identical to to the culture code or culture alias (if set) of the currently selected content culture.
 
Example: <domain>/en-US/Home.aspx

Allow URLs without language prefixes

If enabled, URLs without language prefixes are allowed. Otherwise they are redirected to a corresponding URL with a language prefix. This setting is usable only if Use language prefix for URLs is enabled.

Redirect documents to main extension

If enabled, URLs will be redirected to a corresponding URL with the current main extension if their extension is different. The main extension is the first one specified in the Friendly URL extension field.

Move ViewState to the end of the page

If enabled, the hidden ViewState field is relocated to the end of the page, allowing more content to be processed by search engines.

 

To configure the metadata of individual documents, select one from the content tree of CMS Desk and go to Properties -> Metadata. Here you can set SEO related properties such as the page title, description and keywords. More details can be found at Content management -> Document properties -> Metadata.
 

How to set your domain URL as your home page

 
For SEO purposes, it can be useful to have all URLs that access the Home page of your website redirect to one single URL. The following steps describe how to configure Kentico CMS so that all these URLs are redirected specifically to the base URL of your domain:
 
1. Go to Site Manager -> Settings -> Content, select the site you wish to configure from the drop-down menu, delete the contents of the Default alias path field and click Save.
 
2. Switch to CMS Desk, select your Home page and go to Properties -> Menu, select the URL redirection radio button, enter http://<domain>/ into its field and click Save. This step will ensure that all attempts to access your Home page are redirected to the root of your website.
 
3. Select the root of your website, switch to the Design tab and Configure (Configure) the Page placeholder web part. Find the Default page template field, press the Select button and choose the same page template that your Home page uses (this can be found by selecting your Home page and going to Properties -> Template). Click OK.
 

devguide_clip1139

 
This will cause the root of your website to display your Home page, but be aware that this does not transfer any property settings your Home page document may have had or the contents of Editable text and Editable image web parts. These will have to be entered again for the root document. Also make sure that the Web part control ID properties of all web parts on your Home page are different than those of web parts on the root of your website.
 

4. Add the following key to the /configuration/appSettings section of your web.config file:

 

<add key="CMSDefaultPageURL" value="~/" />

 

This will change the default URL of your website root to <domain>/.

 
5. If your instance of Kentico CMS is running on a server with IIS 7 or higher installed, add the following key to the /configuration/appSettings section of your web.config file:
 

<add key="CMSUseRedirectForDefaultPage" value="true" />

 
Now find the opening <modules> tag in the /configuration/System.webServer section of your web.config file and change it to the following:
 

      ...

<modules runAllManagedModulesForAllRequests="true">

    ...

</modules>

 
Then go to Site Manager -> Settings -> URLs and SEO and enable the Redirect document aliases to main URL setting. This step will ensure that the <domain>/default.aspx URL is always redirected to <domain>/.
 

 

Important!

 

This step is not possible when running on IIS versions lower than 7, as they do not differentiate between <domain>/ and <domain>/default.aspx and adding the key to your web.config file may cause an infinite redirection loop. If you are running on IIS versions lower than 7, follow only steps 1, 2, 3 and 4.