XML sitemap
The XML sitemap is the file search engines read to find your pages. JoomSitemap writes it from the active pages in Manage URLs.
Write the sitemap
- Open Manage URLs.
- Click Write Sitemap.
- The message XML sitemap
sitemap.xmlhas been successfully written. names the file.
The file is written to the path set in Options > JoomSitemap > XML Sitemap Path, relative to your Joomla folder. The default is sitemap.xml in the site root, so the address is https://your-site/sitemap.xml.
A crawl in the administrator does not write the file. Click Write Sitemap after each crawl, or use the command line crawl with --write-sitemap.
What is in the file
Each active page (state green in Manage URLs) is one <url> entry:
| Tag | Content | Turn off with |
|---|---|---|
loc |
The full address of the page | Always included |
lastmod |
The Last Change date of the page, as YYYY-MM-DD. Left out when the page has no date |
Include Last Change |
changefreq |
The Change Frequency of the page | Include Change Frequency |
priority |
The Priority of the page | Include Priority |
The three switches are on the JoomSitemap tab of the options. When you turn one off, the message after Write Sitemap tells you which tag was left out.
loc uses the domain of your site and the protocol (http or https) of the last crawl. Images found with Include Images are listed as normal URLs.
Compressed copy
With Generate Compressed Version on, JoomSitemap also writes sitemap.xml.gz, a gzip copy of the same file. This needs the PHP zlib extension. When you also use Add Sitemap field on the Robots.txt page, the line points to the .gz file.
Large sites
A sitemap file may hold at most 50,000 URLs. When your index has more active pages, JoomSitemap writes several files and a sitemap index:
sitemap-1.xml,sitemap-2.xmland so on, each with up to 50,000 URLs.sitemap.xml(your configured path) as a sitemap index that lists those files.
Search engines read the sitemap index and then each file.
Old files are removed
JoomSitemap remembers which files it wrote. When you write the sitemap again, files from the last run that are no longer needed are deleted, for example sitemap-3.xml after your site shrank, or the .gz copy after you turned compression off. Each deleted file is named in a message.
Tell search engines where it is
- Add the Sitemap line to robots.txt with Add Sitemap field on the Robots.txt page.
- Submit the sitemap address once in Google Search Console and Bing Webmaster Tools.
- For Bing and Yandex, also use IndexNow.