Dynamic XML Sitemap
Table of Contents
All Files
File Type | Title | Umbraco File Path | Github Link |
---|---|---|---|
Template | XML Sitemap | ~/Views/xmlSitemap.cshtml | View on Github |
How It Works
The XML Sitemap template generates a dynamicly updated XML Sitemap to submit to search engies. This updates based on the content structure within Umbraco and is kept updated as new content is published or unpublished.
By default the XML Sitemap excludes the following:
hideInSitemap
property is checked true - this is included on the Page Settings Document Type- Document Types with the alias
pcFolder
- this is used for the page components buildout - Document Types with the alias
altLink
- typically this is used for alternative links for navigation purposes - Document Types with the alias
xmlSitemap
- so not to include the sitemap in the sitemap - Document Types with the template alias
parentRedirect
- Document Types with no template
Please Note: The page URLs are generated with the trailing slash “/” removed from the page URL.
Setup
- Setup a content page using the XML Sitemap Document Type and name the page “XML Sitemap”
- Make sure the XML Sitemap page is utilizing the included XML Sitemap Template
That is it. Once you have your page utilizing your sitemap template, you should be able to hit the /xml-sitemap
URL and view your XML Sitemap. This is the URL that you can submit to search engies and utilize in your robots.txt file.