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.
- Generates a XML sitemap at the root of your site, with content modifed only in the last week (e.g.
http://example.com/sitemap.xml
) - Generates a complete XML sitemap, with all content in your system (e.g.
http://example.com/sitemap-all.xml
) - Generates a paginated XML sitemap index (e.g.
http://example.com/sitemapindex.xml
) - Includes custom post types
- Advertises sitemap index in
robots.txt
(e.g.Sitemap: http://example.com/sitemap.xml
) - Advertises itself in HTML HEAD with
link rel-sitemap
tag (See http://microformats.org/wiki/rel-sitemap) - Follows the Google News and Image Sitemap schemas
- Featured Images are included automatically
- Includes last modified dates
- Includes category and tag archives
news:language
follows your blog's language setting- The sitemap will be disabled if Discourage search engines is checked
- Install the plugin your plugins directory.
- Enable it from the Plugins menu. Multisite installations can use the Network Activate option.
- Go to Settings... Reading and and uncheck "Discourage search engines from indexing this site" from the Search Engine Visibility section.
- Go to
/sitemap.xml
or/sitemapindex.xml
at your site's root - Validate your sitemap at validome.org/google
- Submit your sitemap to Google Webmaster Tools
This plugin is tested with Codeception
- Update
codeception.yml
with your blog's base URL - Run
codecept run
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.
All sites marked "public" will have their sitemap index included in robots.txt.
Sites marked "archive", "spam", or "deleted" are excluded.
It defaults to the large
size, as available.
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.
Make sure your theme's template includes in the header.