Nextcloud snap install

My nextcloud server is behind my NAT router. I have URL setup through a DDNS service. when I type the URL I get the asked to allow the web site then I am directed to the Nextcloud allow IP address website. I allow then I get page can not be displayed. When I look at the URL I have been redirected to localhost. When on my network I can connect to server from the server or any other computer on my LAN. Please help? Thanks