Generating Certificate: (CRT) & Private Key (KEY) for my website from my local machine


#1

My hosting provider is: Namecheap

I’m using a control panel to manage my site. They don’t have any plugins to use Let’s encrypt. So I decided to generate CRT and Key files on my local machine by installing Certbot. And paste both on the following fields.

Please suggest me the best way. Or is it possible to generate from my local machine? I’m using Ubuntu 16.04.


#2

Hi @RenjithVR4

yes, this is possible. Use something like

certbot certonly --manual --preferred-challenges http -d yourdomain.com -d www.yourdomain.com

Then certbot creates a file per domain name you have to transfer to your webserver. In the directory

/.well-known/acme-challenge

so Letsencrypt is able to validate this file via

http://example.com/.well-known/acme-challenge/file-for-the-example.com
http://www.example.com/.well-known/acme-challenge/file-for-the-www.example.com

If that works, Certbot creates a Certificate request and can download the certificate. Then you can copy both files in your menu.


#3

Thank you. Now I need to write a htaccess rule to strict https redirection. But I have found some issues.
If we are using https, the menu is not visible. I don’t know why this is happening!!!


#4

https://www.whynopadlock.com/ may help you to understand what the problem is.


#5

Happy to hear that it works.

If you want to check your redirects, my (new) profile link may be helpful. It’s a redirect check http + https + www + non-www.