Can i make a cert for my domain and localhost?

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:0.s.csec.top

I ran this command:sudo certbot certonly --dns-cloudflare --dns-cloudflare-credentials cf.ini -d 0.s.csec.top -d localhost

It produced this output:Invalid identifiers requested :: Cannot issue for "localhost": Domain name needs at least one dot

My web server is (include version):flask+nginx

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

My hosting provider, if applicable, is:cloudflare

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

iwant to make a cert for my domain and localhost because cloudflare tunnel always cant send https to localhost

Let's Encrypt will not issue certs for localhost, nor for anything else other than a valid public domain name (or, in limited cases, a public IP address). But I don't think that's what your problem is with the cloudflare tunnel.

5 Likes

You should configure Cloudflare Tunnel not to validate the certificate for "localhost", or use HTTP port 80. Still, the connection is secure because the tunnel itself is authenticated with Cloudflare Edge.

2 Likes

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