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 cloud.xxxxxx.com it should redirect me to https://cloud.xxxxxx.com/nextcloud

but it pauses and then redirects to http://192.168.0.178/nextcloud. which is the old ip address of the server.

if I try cloud.xxxxxxx.com/nextcloud. it works and redirects me to the https://cloud.xxxxxx.com/nextcloud

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.).