Can i use LetsEncrypt in localhost?


I would like to use ssl encrypt in my website, but im already in the develop proccess, i had purchase the domain ‘.uy’(TLD) and a VPS(with debian 8) in hetzner but for a while in working on it in a local environment with a ubuntu16.10 and apache installation with virtualhosts.

i have the following configuration in my local environment

<VirtualHost *:80>

    DocumentRoot /var/www/

    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all


and then because ‘’ doesnt exists i put it con /etc/hosts
you know

in terminal with cerbot


i get this error, i know is because isnt a valid ip address but i have to say im more a developer than a sysadmin

Failed authorization procedure. (tls-sni-01): urn:acme:error:unknownHost :: The server could not resolve a domain name :: No valid IP addresses found for

is a bit uncommon what im trying to do but just asking if exists some 'trick’

warning: my english can be horrible xd


You can not get a certificate for (when it doesn’t really exist), No.

If you own then you could get a certificate for if that helps ?


Also, after the certificate has been issued, you can install it on your own machine and use it in localhost connections.

An alternative that doesn’t require a certificate authority at all is to make a self-signed certificate for (or, if you prefer,, and install it in your server on localhost. Then the first time you connect to it, add an exception in your web browser to tell it to trust that certificate. After that, you can use the self-signed dev certificate within your own machine without getting a certificate error.


As mentioned above, self-signed certificate is a way to go with this. In fact, in that case it would work even without the domain name, just with an IP. They are easy to create, but if you are having any troubles, you can create one in one click here (just enter that non-existent domain or IP into the top field).


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