XML sitemaps
This page is for website creators who give search engines a list of every page. Exponential generates sitemaps with one of two extensions; both run as cronjob parts and write a file the web server serves.
Contents
Choose an extension
bcgooglesitemaps | xrowmetadata | |
|---|---|---|
| Part of the distribution | yes (robots.txt feature) | yes |
| Cronjob parts | googlesitemaps, googlesitemapsmultilingual | sitemap, archivesitemap, newssitemap, mobilesitemap |
| Choose when | you want a plain sitemap | you already use xrowmetadata for page metadata |
bcgooglesitemaps
From bcgooglesitemaps:
php runcronjobs.php googlesitemaps
php runcronjobs.php googlesitemapsmultilingualSettings in settings/override/bcgooglesitemaps.ini.append.php:
| Block | Key | Default | Meaning |
|---|---|---|---|
BCGoogleSitemapSettings | SitemapRootNodeID | 2 | start node |
BCGoogleSitemapSettings | Protocol | https | scheme written into the addresses |
BCGoogleSitemapSettings | Filename, Filesuffix, Path | sitemap, .xml, empty | the file |
Classes | ClassFilterType, ClassFilterArray[] | exclude, empty | include or exclude classes |
NodeSettings | Main_Node_Only | false | only main locations (avoids duplicates) |
NodeSettings | ExcludeNodes, ExcludedNodeIDs[] | disabled, empty | leave out subtrees |
Exclude classes that are not pages (images, files, banners) and set Main_Node_Only=true when content has several
locations.
xrowmetadata sitemaps
php runcronjobs.php sitemapwrites files below var/storage/sitemap/<siteaccess>/ (names in xrowsitemap.ini) and prints each file name; the
rewrite rules must let them through (RewriteRule ^sitemap[^/]*\.xml - [L])
(xrowmetadata, Sitemaps).
Serving and registering
Run the part once and check the file exists and lists your pages.
Add the part to cron, for example nightly (Cronjobs).
Make sure the web server (or Velocity) serves the file rather than passing it to
index.php.Add it to
robots.txt:Sitemap: https://www.example.com/sitemap.xmlSubmit it in the search engines' webmaster tools.
Checklist
- To do: Only real pages are listed, each once.
- To do: Hidden and members-only content is not listed (test with a page you know is restricted).
- To do: The addresses use the public host and
https. - To do: Each language siteaccess has its sitemap.
- To do: Cron regenerates it.
Related pages
- robots.txt for your site
- SEO basics for Exponential sites
- Cronjobs for applications
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.