Certbot isn’t working

My domain is: superiorcraft.net

I ran this command: sudo certbot —apache -d superiorcraft.net -d www.superiorcraft.net

It produced this output: challenge failed for www.superiorcraft.net

My web server is (include version): 0.40.0-1ubuntu.1

The operating system my web server runs on is (include version): ubuntu 11.1

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know): idk

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no terminal on machine

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): 0.40.0-1ubuntu.1

You need to create a DNS record for your www subdomain.

You can do this in your Google Domains control panel.

4 Likes

Really?

4 Likes

To be more specific about Rudy's concern here, Ubuntu 11.10 is not a long-term support release and it stopped being supported by the operating system vendor (Canonical) on 2013-05-09, and also stopped receiving security updates at that time. Since that is nearly 9 years ago, there are a lot of security vulnerabilities that researchers have identified since then that would not have been patched in that system.

Perhaps this was a typo, though—I somewhat doubt that the official Certbot Ubuntu package for 0.40.0 would even install under Ubuntu 11.10 due to dependency issues.

5 Likes

Few things.

  1. I made a mistake on my ubuntu version it’s actually 20.4.
  2. After adding the www to my domain it did nothing. The challenge still failed. It also made it so you can’t access it without entering www in front of the domain.
1 Like

You need to do as suggested above. Right now superiorcraft.net and the www name do not have DNS entries. See Lets Debug

3 Likes

I went out o let’s debug and it said I needed to ad so me records to my domain. A added toe records. One that’s has no hostname and is a good toe a record and the other is a type a record with www hostname. I ram the command again and it had no isssues. However it still says not secure on my site. Trying to go to www.SuperiorCraft.net doesn’t work. It only works without typing the www.

It does not look like you have port 443 open. You should check your router, firewall, any port forwarding, and your server config. Port 80 is fine.

I can reach both domain names using HTTP but I fail to reach both of them using HTTPS.

3 Likes

Ok https is working now that I opened the port. However it’s not redirecting users to https. It’s only secure if you enter https://SuperiorCraft.net. Using the domain alone doesn’t work. How do I redirect users to https?

1 Like

Just run certbot enhance --redirect

3 Likes

All redirects look well to me now from Redirect Checker | Check your Statuscode 301 vs 302. Good job crew! :muscle:

http://SuperiorCraft.net
301 Moved Permanently
https://SuperiorCraft.net/
200 OK
http://www.SuperiorCraft.net
301 Moved Permanently
https://www.SuperiorCraft.net/
200 OK

For SEO purposes you might want to pick either the apex (SuperiorCraft.net) or www subdomain (www.SuperiorCraft.net) then redirect all traffic to your choice.

5 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.