Typo 3 12.1.3 trusted hosts pattern

How to configure a site to work with
in dns all is fixed.

For example. a wordpress site
www.kirsten-mare.com works.
kirsten-mare.com works
www.kirstenMare.com works
and KirstenMare.com works.
How to do the same in typo 3

Best regards,

regarding SEO your website should be identified unique. therefore a redirect would help to switch every access to only one domain - and no trusted hosts pattern necessary.

as you asked specific: as the name said: you need a pattern which includes both versions:
there are multiple pattern possible, dependent whether you only want with and without ‘www’ or any subdomain.
(www.)sitename.com / .*.sitename.com / (www.sitename.com|sitename.com)

Hi Bernd Thnak you for your reply.
In NGINX all is fixed in the sites available conf file including the 2 cerbot ssl certificates.
It works wel on non typo3 sites.
So the unix part is ok.
What i want is 1 typo3 site to respond the same to with www or whitout www
The host patteren really does not do much as i understand its more a filter. when i use .* as pattern everything is passed through.
But the part i can not figure out, and typo3 documentation is not the best one, is where does it know or register de site name. or can you supply aliasses.
Typo3 is very powerfull but not the most user friendly or well supported.
Regards, Hugo

The site configuration has a documentation (Basics — TYPO3 Explained main documentation). In general you can define multiple sites with the same RootPageId, but there is a note to it:

The same root page ID should not be used in multiple site configurations. This may lead to misbehavior, since always the last defined site with this root page ID is used by TYPO3.

You may enter the page with multiple domains. but TYPO3 will prefer one domain and any further links may end in this domain.