Generating Sitemaps

Make your website search-engine friendly with sitemap.xml

In C1 CMS version 4.0 or later, a search-engine friendly sitemap is generated automatically.

To access the sitemap, append /sitemap.xml to your website's URL, for example:

http://www.contoso.com/sitemap.xml

robots.txt

For search crawlers to pick up your sitemap.xml, you need to specify your sitemap's URL in robots.txt:

Sitemap: http:/contoso.com/sitemap.xml

Multi-subsite and multi-language sites

If you only have 1 website language installed and 1 subsite, sitemap.xml will serve as a standard sitemap for your website, listing pages.

<urlset>
  <url>
    <loc>http://www.contoso.com/</loc>
    <lastmod>2013-08-29T11:31:30Z</lastmod>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>http://www.contoso.com/How-to</loc>
    <lastmod>2013-08-29T11:31:30Z</lastmod>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>http://www.contoso.com/Features</loc>
    <lastmod>2013-08-29T11:31:30Z</lastmod>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>http://www.contoso.com/Sitemap</loc>
    <lastmod>2013-09-02T10:08:19Z</lastmod>
    <priority>0.5</priority>
  </url>
</urlset>

In version 4.0, appending /sitemap.xml to a hostname mapped to a language version of the website and/or subsite, will auto-generate a respective sitemap for that site.

In version 4.1 (beta) or later, if you have multiple language versions of your websites and/or multiple subsites, auto-generated sitemap.xml will serve as a Sitemap index, listing URLs to the sitemaps of all the respective sites.

<sitemapindex>
  <sitemap>
    <loc>http://contoso.com/en-US/sitemap.xml</loc>
  </sitemap>
  <sitemap>
    <loc>http://contoso.dk/da-DK/sitemap.xml</loc>
  </sitemap>
  <sitemap>
    <loc>http://contoso2.com/en-US/Site2/sitemap.xml</loc>
  </sitemap>
  <sitemap>
    <loc>http://contoso2.dk/da-DK/Site2/sitemap.xml</loc>
  </sitemap>
</sitemapindex>

Troubleshooting

If no sitemap is generated when you append /sitemap.xml to your website's URL, make sure:

  • the version of your C1 CMS instance is 4.0 or later
  • you have these configuration settings in your web.config:
<configuration>
  <!-- skipped -->
  <system.webServer>
    <!-- skipped -->
    <handlers>
      <!-- skipped -->
      <add name="SiteMap" verb="GET" path="sitemap.xml" type="Composite.AspNet.SiteMapHandler, Composite" />
    </handlers>
    </system.webServer>
</configuration>

and

<configuration>
  <!-- skipped -->
  <system.web>
    <!-- skipped -->
    <httpHandlers>
      <!-- skipped -->
      <add verb="GET" path="sitemap.xml" type="Composite.AspNet.SiteMapHandler, Composite" />
    </httpHandlers>
  </system.web>
</configuration>