iOS CalDav/CardDav issues (SSL)

Hi, I don’t think this is an Nextcloud issue but someone here might have an answer.

I’m hosting my own Nextcloud in a docker, I have an Nginx docker with letsencrypt. It has worked perfekt on my android phone to sync contacts and calendar.
Today I got my first iphone in 10 years.
I go to contacts, add account, I enter my url in the format nextcloud.domain.io, then I get a certificate error and the certificate shown is not my Letsencrypt certificate but my Unifi router certificate.
If I on my iphone starts safari and browse to nextcloud.domain.io the correct certificate is shown.

Does anyone have any idea on whats wrong?

Ok, i found out that it works, it just dont work with the username “name name” or “name.name@mail.de”… so i must create a new user with a short name (no spaces) and migrate all data to that user. fun.