Free XML sitemaps for WordPress

An XML sitemap that works out of the box

NiroSitemap serves a complete sitemap at /sitemap.xml covering posts, pages and every public custom post type. There is no settings screen and nothing to configure.

Free on WordPress.orgVersion 0.9.1WordPress 6.0 or laterPHP 7.4 or later

Settings to configure
0
URLs per sitemap file
2,000
Maximum cache lifetime
12 h

A sitemap should not need a setup wizard

Search engines only need a clean, current list of your published URLs. NiroSitemap generates that list from your content, keeps it cached, and refreshes it when published content changes. It does not write files, contact outside services, or add an admin screen.

Features

Everything NiroSitemap does

  • Works right after activation

    Rewrite rules are flushed automatically on activation and update, so /sitemap.xml works without visiting Settings > Permalinks.

  • Every public post type

    Includes posts, pages and every public custom post type with viewable URLs, such as WooCommerce products. Media attachments are left out.

  • Published content only

    Drafts, private posts and password-protected posts are never listed. Each URL includes its last modified date.

  • Refreshes on publish

    Publishing, updating, unpublishing, trashing or deleting a published post clears the cache, so the next request gets a fresh sitemap.

  • Cached output

    Generated sitemaps are stored as transients for up to 12 hours and rebuilt only when published content changes.

  • Stable pagination

    Each file lists up to 2,000 URLs, ordered by post ID, so editing a post never moves it to a different sitemap page.

  • Listed in robots.txt

    Adds a Sitemap: line to the virtual robots.txt when your site allows search engines to index it.

  • One sitemap, not two

    Turns off the built-in WordPress sitemap at /wp-sitemap.xml so search engines see a single sitemap.

  • Developer filters

    Use nirositemap_post_types to change which post types are included and nirositemap_query_args to exclude specific posts.

How it is built

A sitemap index with one file per post type

/sitemap.xml is a sitemap index that points to a separate sitemap for each post type, such as /sitemap-post-1.xml or /sitemap-product-1.xml. Large post types are split across numbered files.

  • Up to 2,000 URLs per file, split into -2.xml, -3.xml and so on
  • Each index entry carries the most recent modified date for that post type
  • A /sitemap-home.xml entry is added when your homepage shows your latest posts
  • Plain permalinks are supported at /?nirositemap=index

Footprint

Small, and it cleans up after itself

NiroSitemap does not write any files to your server and does not send data anywhere. What it adds, it removes on deactivation.

  • Stores two small options that are deleted on deactivation
  • Removes its rewrite rules on deactivation, and the core WordPress sitemap comes back
  • Cached sitemaps are transients that expire on their own within 12 hours
  • No external services, no tracking, no ads
  • Multisite compatible: each site gets its own sitemap

How it works

From install to done in minutes

  1. Install the plugin

    In your dashboard, go to Plugins > Add New Plugin, search for NiroSitemap and click Install Now.

  2. Activate it

    Activation is the only setup step. There is no settings screen.

  3. Submit your sitemap

    Open your-site.com/sitemap.xml to check it, then submit that URL in Google Search Console and Bing Webmaster Tools.

FAQ

Questions, answered

Requirements

WordPress
6.0 or later
PHP
7.4 or later
License
GPLv2 or later
Current version
0.9.1
License
GPLv2 or later

Where is my sitemap?

At /sitemap.xml on your site, for example https://example.com/sitemap.xml. If your site uses plain permalinks, it is at https://example.com/?nirositemap=index.

Which post types are included?

Every public post type that has viewable URLs, except media attachments. That includes posts, pages and custom post types from your theme or other plugins. Developers can change the list with the nirositemap_post_types filter.

Are categories, tags and author pages included?

No. NiroSitemap lists posts, pages and custom post types only.

How quickly do new posts appear?

Right away. Publishing, updating, unpublishing or deleting a published post refreshes the sitemap on its next request.

My sitemap shows a 404 or a different sitemap. What should I check?

First, look for a real sitemap.xml file in your site's root folder and delete it, since your web server serves it before WordPress loads. Next, turn off the sitemap feature in any other SEO plugin, such as Yoast SEO, Rank Math or All in One SEO. Finally, clear any caching plugin or CDN cache.

Why is there no Sitemap line in robots.txt?

NiroSitemap only adds it when Settings > Reading > Search engine visibility allows indexing. The line is also missing if a real robots.txt file exists in your site's root folder, in which case you can add the line to that file yourself.

Does it ping Google?

No. Google retired sitemap pings in 2023. Submit your sitemap once in Google Search Console, and Google will check it regularly after that.

What happens when I deactivate NiroSitemap?

Deactivating removes the sitemap URLs and deletes the plugin's options. The built-in WordPress sitemap at /wp-sitemap.xml comes back. Cached sitemaps expire on their own within 12 hours.

Get a working sitemap in one click

Install NiroSitemap from WordPress.org, activate it, and submit /sitemap.xml to search engines.

Get NiroSitemap free