Can't access Nextcloud on my domain after Let's Encrypt

Hello! I recently successfully installed Nextcloud as a snap on my Raspberry Pi with Ubuntu Server. It’s connected to my domain, which goes through Cloudflare. Automatic HTTPS is enabled on Cloudflare.

Everything was hunky-dory until I tried to connect to my account through Nextcloud’s software on Linux. It complained about something regarding HTTPS. So I decided to get a Let’s Encrypt for the domain, which was successful.

However, now when I try to access the site, even through Incognito, I get this error…
On Firefox: The page isn’t redirecting properly. An error occurred during a connection to
On Chrome: This page isn’t working. redirected you too many times.

Again, this was in Incognito mode, so no cookies. I also tested the SSL on Everything came out fine. It has a proper certificate.

Do I need edit something in a conf file? If so, would this be the file path? snap/nextcloud/33915/conf/httpd.conf
Or, do I need to do something with my Cloudflare settings?
Or, is it something much different?

Thank you for your time!

To know what is going on, I recommend opening your browser’s developer tools, the Network tab, and inspecting the requests your browser makes, and their responses from the server. You should then be able to see the redirects and perhaps better understand what they are about.

Not sure what I’m looking for here, so attached are some pictures.

For the header “Address”, it looks like a public IP with the port 443 trailing it. However, this isn’t the same public IP of my router. Could Let’s Encrypt change the IP?

What “Address” header do you mean? I don’t see one. I do see the “Location” header though, which is the one the server is telling your browser to go to instead. But its value is a hostname, not an IP.

Did you mean that the hostname that you put in your browser’s address bar, and the hostname in the “Location” header, are not the same? Otherwise, please clarify. It would be great if you could tell us more about what the IPs/hostnames are.

That should not happen, no. Let’s Encrypt only provides certificates, it doesn’t dictate anything in the connection or transaction.

I think we’re getting lost in the weeds. Ignore the questions in my previous reply. They’re probably not relevant to the issue. Based on the two pictures I provided, can you identify why I’m having problems described in my original post?

Not if you don’t want to answer questions.

Under the Get header of the picture I provided. There is a field called Address, which I blacked out the value. The value looks like an IP, trailing with the port number 443. But I’m guessing this may not be relevant.

I’m not too acquainted to understand the question and give a confident answer. Essentially, I was saying the numbers given in the Address field were not the same as my router’s public IP.