Multisite Networks
Super Speedy Sitemaps runs on WordPress multisite networks, both sub-domain and sub-folder. Each site in the network gets its own sitemap index, its own cache folder and its own generation log. Each site’s administrators choose what goes in that site’s sitemaps, while the network super admin controls the settings that cost server resources for the whole network.
Each site has its own sitemap index
Every site where the plugin is active serves its own sitemap index at /sitemap.xml under its own address. The same index is also served at /sitemapindex.xml.
| Network type | Main site | Another site |
|---|---|---|
| Sub-folder | https://example.com/sitemap.xml | https://example.com/shop/sitemap.xml |
| Sub-domain | https://example.com/sitemap.xml | https://shop.example.com/sitemap.xml |
Every sitemap a site’s index lists sits under that site’s address too, for example https://example.com/shop/post_part1.xml on a sub-folder network. Submit each site’s /sitemap.xml to Google Search Console and Bing Webmaster Tools under that site’s own property. If one site’s index returns 404, follow A sitemap URL returns 404 on that site.
A site that asks search engines not to index it (Settings > Reading > Search engine visibility) still serves its sitemaps, but gets no Sitemap: line in robots.txt.
The Site Address sitemap
The Site Address sitemap (site.xml) behaves differently on the main site of a sub-folder network. There it lists the home page of every site in the network that is public and not marked as spam or deleted. Sites with a domain of their own are left out, because a sitemap may only list URLs on its own host.
Every other site, and every site on a sub-domain network, lists only its own home page in site.xml.
Who controls which settings
Each site’s administrators configure their site at Super Speedy > Sitemaps in that site’s dashboard. The plugin adds nothing to the Network Admin screens.
The network super admin, working on the main site’s settings screen, sees extra settings that apply to every site in the network. Site administrators do not see these, and a value saved on the main site overrides anything a site had before:
- Compress sitemaps
- Enable multisite robots.txt support
- The whole Sitemap Cache section: Enable caching, Enable auto cache re-generation, Cache expiry time, Cache directory and When a sitemap cannot be generated
- The whole Sitemap modules section: Database query limit and Custom module directory
- Enable message log, Enable debugging mode and Enable extra debugging mode
- The Flush Cache and Save Changes and Flush Cache buttons
Everything else is per site: which sitemaps, post types and taxonomies are included, exclusions, external pages, item limits, default values, pinging, look and feel, the Google News and image extensions, Use GMT for Last Modified date, Enable robots.txt support and Enable build stats.
A super admin visiting another site’s settings screen sees the same reduced set as that site’s administrators. The network-wide settings are only on the main site.
robots.txt on a network
With Advanced Options > Robots.txt > Enable robots.txt support on, the plugin adds a Sitemap: line to the robots.txt WordPress generates. Where that line appears depends on the network type:
- Sub-domain network: each site has its own
robots.txt, and each one lists that site’s own index. - Sub-folder network: only the main site has a
robots.txt, because the file must sit at the root of the host.https://example.com/shop/robots.txtdoes not exist, so the other sites’ Enable robots.txt support setting has no effect. The main site’s robots.txt lists only the main site’s index.
To list every site’s index in the main site’s robots.txt, the super admin ticks Enable multisite robots.txt support on the main site. The main site’s robots.txt then reads:
Sitemap: https://example.com/sitemap.xml
Sitemap: https://example.com/shop/sitemap.xml
Sitemap: https://example.com/blog/sitemap.xml
It lists every site that is public and not marked as spam or deleted. Enable robots.txt support must also be on for the main site, because that is what adds the plugin’s lines to robots.txt at all.
Turn on Enable multisite robots.txt support on a sub-folder network. Without it, crawlers reading robots.txt only learn about the main site’s sitemaps, and the other sites rely on being submitted by hand.
If a physical robots.txt file exists in the web root, WordPress serves that file instead and nothing can be added to it. Add the Sitemap: lines to the file by hand.
Each site has its own cache
When the super admin turns on Enable caching, each site stores its cached sitemaps in its own uploads folder:
| Site | Cache folder |
|---|---|
| Main site | wp-content/uploads/super-speedy-sitemaps/ |
| Any other site | wp-content/uploads/sites/<site ID>/super-speedy-sitemaps/ |
The cache settings themselves (on or off, expiry time and failure handling) are shared by the whole network.
Flush Cache on the main site’s settings screen empties the main site’s cache folder only. On any other site, the cached sitemaps are rebuilt when they expire, or when an administrator of that site clicks the regenerate button in the Generated Sitemaps table on the XML Sitemaps tab. That button marks every cached sitemap on that site as out of date, so each is rebuilt on its next request.
Each site has its own generation log
The generation log is available since 1.14.0.
Each site keeps its own Sitemap Log, in a database table with that site’s table prefix, such as wp_sssm_gxs_generation_log for the main site and wp_2_sssm_gxs_generation_log for site 2. Each site’s Sitemap Log tab shows only that site’s builds, and Clear Log clears only that site’s log. Site administrators can view and clear their own site’s log.
Whether builds are logged at all is a network-wide choice: Advanced Options > Debugging > Enable message log on the main site, on by default.
Further reading
Written for Super Speedy Sitemaps 1.14.0.
Comments