Trusted domains won't work


usually I used a Raspberry Pi for nextcloud, but after facing some problems with the hardware I rented a vServer. And I also bought a domain.

So the problem I have is, that I it says that the domain is not trusted (it works with the public IP address). The domain is my last name, so f.e. The installation is on and I also registered a subdomain with
So I wrote the following in the config.php:
‘trusted_domains’ =>*
array (
1 => ‘

Is this correct? Why doesn’t it work?

Nextcloud version: 20.0.2
Operating system and version: Debian 10
Apache 2.4.38
PHP version 7.3

thx in advance

I don’t know why but it works… I added ‘’ and restarted apache…

It’s because and are not the same thing. The one used to access it must be in the list.