Hello @May!
Welcome to the Nextcloud community!
It’s normal!
You have to add it in the server conf file and not in nextcloud.conf !
An example with Apache :
<VirtualHost *:80>
ServerName cloud.nextcloud.com
Redirect permanent / https://cloud.nextcloud.com/
</VirtualHost>
If you are using Apache, the path is /etc/apache2/sites-available/xxx.conf
.
The official documentation Hardening and security guidance — Nextcloud latest Administration Manual latest documentation
Please, let me know if you have any questions.