My website was working and could be entered through devices outside my network! It scores on PageSpeed Insights 100 in every category except for one... and that one is to make my website use HTTPS! First of all, Certbot just told me how to generate a certificate! But Certbot didn't automatically instruct the NGINX to use the certificate nor tell me how to manually instruct NGINX to use the certificate! So I had to find out how to do that, which was REALLY hard. And even if I probably did it, I still don't know if I did it correctly! I enter my website locally through localhost on my browser to realize my site is still insecure because Google says it's an invalid certificate! I checked if my website can be entered on other devices outside my network, and sadly my website cannot be reached anymore! Idk how and what Certbot managed to mess up, but even if I revert my config file for NGINX back to how it used to be before I tried to make my website secure, I won't be able to enter my website through localhost nor outside my network! I tried disabling my firewall temporarily that made no difference! Please help! I'm in a hopeless situation! I couldn't find any solution online! Please help seriously!
I'm sure certbot only did what you asked it to do.
Namely, obtain a cert [and redirect HTTP to HTTPS].
From there it is up to the web server admin to use the cert and manage the site as desired.
To wit:
HTTP does redirect to HTTPS.
Then the base domain redirects to "www".
But that FQDN resolves to a completely different IP.
You've instructed Certbot to NOT install the certificate:
How would Certbot be able to do that? Certbot doesn't have a crystal ball. TLS certificates can be used for multiple different kind of services, like mailservers, not just webservers. Certbot assumes a liiiiiiitle bit of knowledge by the user.
You probably want to open port 443 to allow HTTPS traffic. (Assuming 83.179.80.74 even is the correct IP for www.heetinc.net.)
By the way, by only specifying -d heetinc.net, you're not including www.heetinc.net in the certificate. I see you also have a separate certificate for www.heetinc.net (crt.sh | 8730234693), but usually one has both hostnames in a single certificate.
Ghe, funny, when you go to https://heetinc.net/, a "Google Trust Services LLC" certificate is returned. So I have absolutely no idea where the nginx instance of OP seems to be running, but it doesn't seem to be behind heetinc.net. It puzzles me that using the webroot plugin OP was even able to get a LE certificate at all?
"Website can’t be reached anymore even with temporarily disabled firewall and certificate is invalid somehow! Seriously please help! "
Not sure how this is a Let's Encrypt community forum issue.
Yeah, I know I did not instruct it to do that. I'm just saying... To manually instruct NGINX to use the certificates wasn't hard! It was hard to find a blog post! And I don't know. When I ask Certbot via CMD what certificates I have, it says there's only 1 certificate, and that certificate is heetinc.net! But when I checked the alternative names in the certificate viewer through my browser, it showed heetinc.net and www.heetinc.net! By the way, 13 hours ago, I turned off the server... I'll leave it on from now unless you tell me that it's unnecessary!
My website was working fantastically! But I tried using Let's Encrypt with Certbot, everything stopped working! So obviously, this has something to do with Let's Encrypt and Certbot! Thanks for the documentation and forum, but they weren't helpful...
I'm doubting that very much. You've instructed Certbot not to modify the nginx configuration (which is all explained in the Certbot documentation by the way), so Certbot didn't do anything for starters. And thus Let's Encrypt, in extension to that, also wasn't a factor in itself.
Curious, as no such certificate has ever been issued by a publicly trusted CA at this time: crt.sh | heetinc.net Only certs for either heetinc.netorwww.heetinc.net, never both. I just pressed F5 and crt.sh only just now also presents crt.sh | 8741690427 in the search box, but cannot show me the cert itself.. The site seems to be a little bit slow.
Also, currently 83.179.80.74 seems to be up and running again and providing a valid LE certificate for heetinc.net and www.heetinc.net indeed.
Some points from my perspective:
Certbot nor Let's Encrypt didn't do anything, as you instructed Certbot to only get a certificate with the certonly command;
Your apex domain heetinc.net points to some Google IP addresses which redirect to www.heetinc.net;
www.heetinc.net seems to be your nginx webserver and is up and running currently;
www.heetinc.net is ONLY listening on port 443 for HTTPS, but NOT on port 80 for HTTP. So users typing in www.heetinc.net in their address bar using something else than Google Chrome will see an error, as there is no HTTP to HTTPS redirect.
To the point that they are 2 different web servers: 1. server: ghs 2. server: nginx/1.22.1
$ nmap -Pn www.heetinc.net
Host discovery disabled (-Pn). All addresses will be marked 'up' and scan times will be slower.
Starting Nmap 7.91 ( https://nmap.org ) at 2023-02-26 10:02 PST
Nmap scan report for www.heetinc.net (83.179.80.74)
Host is up (0.22s latency).
rDNS record for 83.179.80.74: m83-179-80-74.cust.tele2.lt
Not shown: 985 filtered ports
PORT STATE SERVICE
1/tcp open tcpmux
22/tcp open ssh
37/tcp open time
43/tcp open whois
443/tcp open https
514/tcp open shell
711/tcp open cisco-tdp
1175/tcp open dossier
1723/tcp open pptp
3389/tcp open ms-wbt-server
5555/tcp open freeciv
7911/tcp open unknown
8222/tcp open unknown
30951/tcp open unknown
32768/tcp open filenet-tms
Nmap done: 1 IP address (1 host up) scanned in 146.29 seconds
$ nmap -Pn 216.239.32.21
Host discovery disabled (-Pn). All addresses will be marked 'up' and scan times will be slower.
Starting Nmap 7.91 ( https://nmap.org ) at 2023-02-26 10:08 PST
Nmap scan report for any-in-2015.1e100.net (216.239.32.21)
Host is up (0.012s latency).
Not shown: 998 filtered ports
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap done: 1 IP address (1 host up) scanned in 6.69 seconds
$ nmap -Pn 216.239.34.21
Host discovery disabled (-Pn). All addresses will be marked 'up' and scan times will be slower.
Starting Nmap 7.91 ( https://nmap.org ) at 2023-02-26 10:10 PST
Nmap scan report for any-in-2215.1e100.net (216.239.34.21)
Host is up (0.012s latency).
Not shown: 998 filtered ports
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap done: 1 IP address (1 host up) scanned in 6.69 seconds
$ nmap -Pn 216.239.36.21
Host discovery disabled (-Pn). All addresses will be marked 'up' and scan times will be slower.
Starting Nmap 7.91 ( https://nmap.org ) at 2023-02-26 10:10 PST
Nmap scan report for any-in-2415.1e100.net (216.239.36.21)
Host is up (0.013s latency).
Not shown: 998 filtered ports
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap done: 1 IP address (1 host up) scanned in 4.79 seconds
$ nmap -Pn 216.239.38.21
Host discovery disabled (-Pn). All addresses will be marked 'up' and scan times will be slower.
Starting Nmap 7.91 ( https://nmap.org ) at 2023-02-26 10:10 PST
Nmap scan report for any-in-2615.1e100.net (216.239.38.21)
Host is up (0.012s latency).
Not shown: 998 filtered ports
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap done: 1 IP address (1 host up) scanned in 5.31 seconds
Hey, I hope you're having a great day! I'm glad that patience has got the website to start working again, and with a valid certificate working too! Wow, no one told me that! But I don't know if what I'm experiencing is normal... As you said, I should do something that would redirect HTTP to HTTPS instead of sending users directly to HTTPS! I don't know, but I'm port forwarding for port 80 and port 443! If I stop port forwarding port 443, the website stops working again! Regardless of port 80 still being port forwarded! I'm unsure how to do what you suggested... Could you please send a link to a guide? I tried adding a separate server for port 80 in my NGINX config file, but that didn't do anything... Weirdly, my connection is not secure if I enter localhost in the search bar on my browser to locally connect to my website! It also used to show my localhost IP address! For everyone, it is 127.0.0.1! But now, it shows ::1... And I can't connect to my website using the host's private IP even when connected to the same network! Is this all normal? And please send a link to a guide to your suggestion!
Edit: I think I managed to require NGINX to redirect the user from HTTP to HTTPS myself! But maybe only if you enter http://www.heetinc.net or without the www... Because I instructed Google Domains to forward the heetinc.net path to https://www.heetinc.net path! And I have no idea if that causes issues...
I hope you're having a good time Bruce! Like I said 3 days ago, I tried undoing everything, but SOMEHOW that wouldn't fix anything! But no worries! The website is working now, just with a couple of concerns... Firstly, entering my website from another network shows it's secure, but entering it with localhost in my browser's search bar, shows the opposite... Then, when I check my localhost IP address on my website, which should be 127.0.0.1, I get ::1! The next weird thing is that when I connect to my website using the host's private IP address while connected to the same network, it opens my router page! It used to be a different case! It used to open my website! Just let me know if all of this is normal, and if not, tell me how to fix them, please!
When connecting using HTTPS from a browser the name used in the browser URL must match a name in the cert. That explains the security warning. You could consider using your hosts file to map your public dns name to a local IP (search the internet for instructions)