How to Enable Valid SSL in localhost for XAMPP? Windows

Here we are going to discuss the step-by-step procedure to create and enable SSL cert locally to be used in XAMPP in Windows.
First, we need to install XAMPP Package in the System. To download the package please visit the link here



Installation Folder

Select language


Follow the instructions and give Next it will start installing XAMPP.

Download and paste the 2 files into the crt folder

Edit cert.conf

Change {{DOMAIN}} text using the domain we want to use, here “ “and save.

Double-click the make-cert.bat and input the domain when prompted. And just do enter in other questions since we already set the default from cert.conf

As a result, the folder test. in will create their certificate, and the key file will store


Now we have created a certificate file and stored it in the Apache folder

Make the localhost entry for test. in

C:\Windows\System32\drivers\etc\hosts  add the below line and save it.

Now we need to attach the SSL certificate to the localhost

Open control panel XAMPP and select config –Apache HTTPd-SSL.conf file

XAMPP setup

Select the servers want to install in the server and give next

select components

Choose the Installation folder

Bitnami for XAMMP

Once complete the installation Open the XAMPP control panel and start Apache Server. I will open the ports and start running.

XAMPP Control pannel

To create an SSL certificate we need to do the following steps,

Navigate to the Apache directory in XAMPP. C:\xampp\apache.

Create a folder there named ‘crt ‘

So we will have C:\xampp\apache\crt

XAMPP Control panel v3.30

Add/ edit the below lines then save and restart apache from the control panel

<VirtualHost _default_:443>

DocumentRoot “C:/xampp/htdocs”


SSLEngine on

SSLCertificateFile “crt/”

SSLCertificateKeyFile “crt/”

Open the browser and

Connection secure

At Velan, our server support engineers can help to install and configure XAMPP and configure SSL for localhost on your Windows servers. If you are interested in our service, please fill out the Quick Connect form to get in touch with us.



Quick Connect With Us