Skip to main content


Overdog Starter doesn't include a pre-installed plugin for sitemap generation, as it's designed to allow developers to customize their fields and data for SEO. Instead, a Twig template is provided for generating a sitemap.

Sitemap Twig Template

The provided template/sitemap.xml.twig file generates an XML sitemap that you can submit to search engines to help them crawl and index your site more effectively. Below is the structure of the template:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="">
   {# Homepage #}
   {% set home = craft.entries.section('singleHome').one() %}
      <loc>{{ siteUrl }}</loc>
      <lastmod>{{ home.dateUpdated|date("c") }}</lastmod>
   {# Entries - exclude sections and type in the query #}
   {% set allEntries = craft.entries()
   {# Loop through entries #}
   {% for entry in allEntries %}
         <loc>{{ entry.url }}</loc>
         <lastmod>{{ entry.dateUpdated|date("c") }}</lastmod>
   {% endfor %}

This template will include your homepage and all other entries that have a non-empty URI. Each URL node contains the location (loc) and the last modified date (lastmod) of the page. This information helps search engines prioritize crawling based on the content update frequency.

By using this Twig template, you maintain complete control over what gets included in your sitemap and can customize it according to the unique needs of your project.