The new TYPO3 9.5 can now perform various SEO tasks directly from the core. Of course, there is also an XML sitemap that can be automatically generated from the page tree, or even more complexly rendered with a custom data provider.
How to create a simple sitemap.xml URL
First, you have to install the extension "seo", which has been newly integrated into the core since TYPO3 9.5.
Then the static TypoScript template has to be integrated into the main template of the website. Best in the root page, unless you have a special case.
The sitemap or the sitemap index can be reached immediately under the following URL:
Browser HTML output
Raw sitemap XML source
The whole thing is explained here in the official TYPO3 documentation:
However, no further details are given on how to create a URL with the format "mydomainisawesome.com/sitemap.xml". Some users asked this question on the internet and I solved it in the following simple way:
In the new module "Site" you can create so-called static routes in the settings of the respective page. Here you can simply create a new static route called "sitemap.xml" or any other name. Simply paste the URL of the sitemap into the "Page, File or URL" field of the URL of the previously generated sitemap.
You should now be able to call up a simple sitemap or a sitemap index via the URL format "/sitemap.xml" in the browser!
Note: In another article, I will describe how to make all Sitemap URLs more readable, not just the index. For this part I need some time to get to know TYPO3 9.5 even better.