Confluence sitemap generator is free plug-in for Atlassian Confluence that allows automatically generate Sitemap XML with all public pages and blogs available to anonymous users in your Confluence site.
To install the plug-in, refer to Confluence documentation
You can access configuration settings, from the Manage add-ons page.

By default, the Sitemap will be generated automatically every month, you can simply change the interval, disable automatic execution, or start generation manually using Confluence's scheduled jobs configuration.
Refer to Confluence Scheduled Jobs

To download Sitemap XML file Navigate to Confluence Administration Console -> Sitemap and click on Download sitemap link.