Site Definition

Contains a server-side collection of files that defines the structure of one or more site templates.

Real World Example

A developer familiar with earlier versions of SharePoint Products and Technologies wants all pages in a set of SharePoint sites to have a common look and feel. To enable this, she creates a site definition based on an existing default site definition, and then modifies the look and feel of the various pages and lists contained within the site definition.

Technical Details

A site definition is composed of the following:

  • A webtemp.xml file that defines the numbering and creation details for the various site templates that are contained in the site definition.

  • A separate directory that contains all of the core files used by the site definition, excluding any items that are provided through Features.

The webtemp.xml file is stored in the following directory:

%COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\TEMPLATE\1033\XML

The directory that contains the site definition files is named according to the site definition’s name and is stored in the following directory:

%COMMONPROGRAMFILES%\Microsoft Shared\web server extensions \12\TEMPLATE\SiteTemplates


As a best practice, IDs for site definitions should be greater than 10000.

In earlier versions of SharePoint Products and Technologies, site definitions were a common method of implementing server-wide user interface changes, but in Office SharePoint Server 2007 and Windows SharePoint Services 3.0, the site definitions rely on individual features that are referenced from the site definitions for much of the user interface and functionality.

Support Details

After you create a site by using a custom site definition, that site always relies on that site definition. Therefore, custom site definitions must be maintained for subsequent releases of SharePoint Products and Technologies. If an upgrade occurs, then the site definition also must be upgraded, requiring changes to the site definition and the new upgrade definitions to map the old site definition to the new one.

Site definitions are a powerful method of creating many sites with the same layout; however Features and feature stapling now allow you to give sites additional functionality without the development/support burden that can come with using a site definition.


Never modify the built-in site definitions because of the potential problematic effect this can have during future upgrades.

You must install the files associated with a site definition on every SharePoint front-end Web server or you will experience intermittent rendering issues.