Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
74 lines (51 sloc) 3.79 KB

Google News and Images XML Sitemap

Contributors: pwenzel
Tags: xml, sitemap, multisite, network, custom post types
Requires at least: 3.7
Tested up to: 4.1.1
License: GPLv2 or later

Provides an XML Sitemap with Google News and Image Sitemap support. Supports custom post types and multisite installations. Includes Sitemap Index for large sites.


This plugin automatically generates an XML sitemap and advertises itself to search engines in robots.txt and your page header.

It is designed to be run with no human intervention. Therefore, this plugin contains no options.

Requires at least PHP 5.3.0.



  1. Install the plugin your plugins directory.
  2. Enable it from the Plugins menu. Multisite installations can use the Network Activate option.
  3. Go to Settings... Reading and and uncheck "Discourage search engines from indexing this site" from the Search Engine Visibility section.


  1. Go to /sitemap.xml or /sitemapindex.xml at your site's root
  2. Validate your sitemap at
  3. Submit your sitemap to Google Webmaster Tools

Unit Testing

This plugin is tested with Codeception

  1. Update codeception.yml with your blog's base URL
  2. Run codecept run

Frequently Asked Questions

What custom post types are included?

In addition to posts and pages, all custom post types you register will be included in the sitemap.

Custom post types will be excluded if their public option is false, or if exclude_from_search is true.

Attachments are excluded from the sitemap, unless they are added to a post as a Featured Image.

What sitemaps are included in robots.txt if using Wordpress Multisite?

All sites marked "public" will have their sitemap index included in robots.txt.

Sites marked "archive", "spam", or "deleted" are excluded.

What image sizes are included in the image sitemap?

It defaults to the large size, as available.

Do you use the post creation date, or the last modified date?

The lastmod attribute in your sitemap uses a post's last modified date, not the post creation date.

This ensures that search engines are aware of content changes.

I don't see a link rel-sitemap tag in my header. Why not?

Make sure your theme's template includes in the header.

You can’t perform that action at this time.