Skip to main content

Sitemaps

Sitemaps tell search engines which pages your site has, when they were last updated, and (optionally) when they were published. The flexweg-sitemaps plugin generates them automatically on every publish — visitors don't see them, but Google, Bing and other crawlers fetch them via robots.txt.

This page covers what the public-facing files look like. For configuration, see the flexweg-sitemaps plugin reference.

What gets published

When the plugin is enabled, your public site has:

  • /robots.txt at the root — points crawlers at the sitemap index
  • /sitemaps/sitemap-index.xml — master file, lists every yearly + News sitemap
  • /sitemaps/sitemap-2026.xml, sitemap-2025.xml, … — one per calendar year that has online content
  • /sitemaps/sitemap-news.xml — Google News urlset (when News is enabled)
  • /sitemaps/sitemap.xsl + /sitemaps/sitemap-news.xsl — browser-friendly HTML rendering when opened directly

What a sitemap looks like

sitemap-2026.xml:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://example.com/sitemaps/sitemap.xsl"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/news/launch-announcement.html</loc>
<lastmod>2026-03-15T10:00:00Z</lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://example.com/news/q1-update.html</loc>
<lastmod>2026-04-02T14:30:00Z</lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
</urlset>

The <?xml-stylesheet?> PI is invisible to crawlers but transforms the file into a styled HTML table when a browser opens the URL directly. Try it: https://your-site.com/sitemaps/sitemap-2026.xml in any browser.

What robots.txt looks like

User-agent: *
Allow: /

Sitemap: https://example.com/sitemaps/sitemap-index.xml
Sitemap: https://example.com/sitemaps/sitemap-news.xml

The plugin generates this default when the user-supplied robots body is blank. To customise (e.g. block specific crawlers, exclude certain paths), edit the textarea in /settings/plugin/flexweg-sitemaps.

Submitting to search engines

Once your site is live with sitemaps:

Google Search Console

  1. Add your site to Google Search Console
  2. Verify ownership (DNS record, HTML file upload, or <meta> tag — the meta tag is easy via flexweg-custom-code)
  3. SitemapsAdd a new sitemap → enter sitemaps/sitemap-index.xml
  4. Google starts crawling within hours; full indexing takes days/weeks

Bing Webmaster Tools

Similar flow — Bing Webmaster Tools → submit sitemaps/sitemap-index.xml.

Other crawlers

Most respect robots.txt's Sitemap: lines automatically — no manual submission required.

Google News specifics

When News is enabled, sitemap-news.xml lists posts modified within the configured rolling window (default 2 days) with <news:news> metadata:

<url>
<loc>https://example.com/news/breaking-story.html</loc>
<news:news>
<news:publication>
<news:name>Example News</news:name>
<news:language>en</news:language>
</news:publication>
<news:publication_date>2026-04-15T08:30:00Z</news:publication_date>
<news:title>Breaking story headline</news:title>
</news:news>
</url>

Google News only crawls sites that have been approved for News inclusion via Publisher Center. Submitting sitemap-news.xml without approval has no effect.

Static-site SEO caveats

  • <lastmod> reflects updatedAt — not the actual deployment time. Editing a post's content updates <lastmod>; editing a sibling's settings doesn't.
  • <changefreq> is a hint — defaults to monthly. Crawlers ignore it as often as they respect it.
  • <priority> is a hint — defaults to 0.7 for posts, 0.5 for pages, 1.0 for the home page (when included).
  • Pages are included by default — toggle off in plugin settings if you don't want them indexed (e.g. internal pages).

Continue