Moved to a new ip address and server redirects to old ip address

I just finished installing Nextcloud on a Ubuntu 16.04 LTS with apache2, I had everything working well, then I needed tomove it to a new ip address on my network so I could go live with it.

Some of the setup I did, was.
I did a redirect on http to https. and created a index file
when I try and goto it should redirect me to

but it pauses and then redirects to which is the old ip address of the server.

if I try it works and redirects me to the

Any help would be greatly appreciated.

here is what is in the default index.html on the apache server.

Check you apache configuration if you redirect somewhere to the old IP (can be in /etc/apache2/* or also in an .htaccess-file in /var/www/). Also check the config.php of your Nextcloud, if you put the ip address (e.g. trusted_domains or cli.).