Nextcloud Snap website redirect

Hello Nextcloud community,

Running on Nextcloud 20.0.9 on a snap installation on Ubuntu.

The issue i’m having is when someone tries to connect to our public IP (instead of our domain) they get “Access through untrusted domain” but I would prefer that it gets automatically redirected to our domain instead. Is it possible to do a redirect like this?

Thanks in advance

I don’t believe Nextcloud will do that for you, it’s something you’d have to do at the web server or, in the case of the snap, reverse proxy level. Honestly though… why would someone be visiting via IP address when you have a domain name? Would it be terrible to add the IP as a trusted domain?