Configure a sitemap
Sitemaps help search engine crawlers navigate your site and improve search engine optimization (SEO). By default, the sitemap is generated for the whole site and stored in cache. An XML sitemap is created specifically for search engines to show details of the available pages in a website, their relative importance, and the frequency of content updates.
In the sitemap, each page is represented by a URL element.
By default, the sitemap uses the Host Name defined in the Basic section in the site host item of your site (<site collection>/<site>/Settings/Site Grouping/Site). If both the Host Name and the TargetHostName fields are empty, the sitemap returns a 404 error.
To ensure that the sitemap link is generated properly, you must configure the target hostname and scheme on the site host item.
To configure the sitemap for your site:
- In the Content Editor, navigate to
/Settings/Sitemap. - Fill in the following fields:
- Tab: Field
- Alternate links: Generate alternate links
- Include x-default: Select to add the xhtml element with hreflang set to x-default to the URL element. The x-default value signals to the search algorithm that the page does not target any specific language or region.Example:
- hreflang: Specify language and region options for the hreflang attribute language and region - URLs are rendered both for region dependent and independent codes. Example region only - URLs are rendered only for region dependent codes. Example language only - URLs are rendered only region independent codes. Example:
- Urlset attributes: lastmod
- changefreq: Select to render the
changefreqattribute that belongs to theURLelement. Specifies how often the page changes its content. - priority: Select to render the
priorityattribute that belongs to theURLelement. Specifies a number between 0 and 1 that represents the importance of a specific page. - URL options: Link provider name
- Content crawling: Crawler
- Cache: Refresh threshold
- Cache Type: Specify how the sitemap is stored:Inactive - turns the sitemap off.Stored in cache - stores the sitemap for the whole site in the cache. Select this option if your site is hosted on an environment such as Azure and you cannot easily store files on a drive, or if your site is very dynamic and you have to re-generate the sitemap almost every time it is requested. This option is turned on by default.Stored in file - stores the sitemap for the whole site in a file. Select this option if you have a large site that does not change frequently.
- Cache Type: Cache Expiration - Specify in minutes the lifetime of the sitemap in the
HttpRuntime.Cacheproperty. - Sitemap index: Maximum number of pages per sitemap
- Media items: Generate sitemap media items