How to Install an SSL Certificate on XAMPP

In this tutorial, we’ll demonstrate to you how to install an SSL certificate on XAMPP. You will also discover the best place to shop for affordable SSL Certificates.

Install an SSL Certificate on XAMPP

Table of contents

  1. Generate a CSR Code for XAMPP
  2. Install an SSL Certificate on XAMPP
  3. Test Your SSL Installation
  4. Where to Buy the Best SSL Certificate for XAMPP?

We also recorded a video that walks you through the entire process of installing an SSL certificate on XAMPP:

If you prefer the text version of the tutorial, keep reading below:


Generate a CSR Code for XAMPP

If you’ve already generated the CSR code and received the SSL certificate in a ZIP folder, jump straight to the installation steps.

The Certificate Signing Request, or simply CSR, is a small, encoded text file containing information about your domain and company. All commercial CAs require SSL applicants to submit a CSR code, as part of the SSL validation process.

Since XAMPP runs locally on your device, you have several options when it comes to creating your CSR code. Listed below are two CSR generation methods, please select one and follow the instructions inside the link:

  1. Use the SSL Dragon’s CSR Generator Tool
  2. Follow our step-by-step tutorial on how to create the CSR via the OpenSSL utility for Apache

After you generate the CSR code and the private key files, continue with the installation instructions.


Install an SSL Certificate on XAMPP

Once the CA validates your SSL Certificate and delivers the necessary files to your inbox, download the archived ZIP folder and extract its contents on your device.

Here’s what you’ll need:

  • Your primary SSL Certificate file.
  • The CA Bundle or SSL Chain file containing your root and intermediate certificates
    Note: If your bundle is broken in several SSL files, you will need to merge the contents of each file into a Single plain text document file (.crt extension). Add your intermediate certificates first, followed by the root certificate.
  • The private key file you generated along with the CSR code.

When your SSL files are ready, please perform the following:

Step 1: Create a folder on your XAMPP server

You will use this folder to store the SSL files. For example, you can use this directory: xamppapachessl

Step 2: Find the configuration file for your website

Use one of the two ways below:

  1. In the XAMPP control panel click Config and select Apache (httpd-ssl.conf)
  2. Use the file explorer to locate the configuration file. It resides in the folder where you installed the XAMPP control panel. For example, ”dxamppapacheconfextrahttpd-ssl.conf”

Step 3: Edit the virtual host for port 443

Open the configuration file with any text editor such as Notepad and follow the example below, then save the changes.

DocumentRoot "/var/www"
ServerName yourdomain.com
ServerAlias www.yourdomain.com
SSLEngine on
SSLCertificateFile "D:/xampp/apache/ssl/yourdomain_com.crt"
SSLCertificateKeyFile "D:/xampp/apache/ssl/yourdomain_com.key"
SSLCACertificateFile "D:/xampp/apache/ssl/yourdomain_com.ca-bundle"

Note: Make sure you replace the server name and alias, and the certificate paths with your actual names and locations.

Step 4: Restart the server

In the XAMPP control panel click Stop, then Start.

Congratulations, you’ve successfully installed an SSL Certificate in XAMPP.


Test Your SSL Installation

After you install an SSL Certificate in XAMPP, it’s recommended to test your SSL installation for potential errors. With the help of these high-end SSL tools, you can get instant scans and reports on your SSL Certificate.


Where to Buy the Best SSL Certificate for XAMPP?

You don’t need to leave this website! Here, at SSL Dragon, we offer the widest range of SSL products at incredible prices. All our certificates are compatible with XAMPP and are suited for projects of any size and budget.


Frequently Asked Questions

Can I install an SSL certificate on XAMPP?

You can generate a self-signed certificate or install a third-party SSL certificate on XAMPP.

Copy Link

How do I get a localhost SSL certificate?

SSL Dragon offers third-party SSL certificates compatible with localhost. After you submit the CSR to the CA, you will receive the SSL certificate. Our installation guide will help you install it.

Copy Link

How do I know if an SSL certificate is installed on XAMPP?

If an SSL certificate is installed on XAMPP, your website URL should begin with HTTPS instead of HTTP, where S stands for secure. You can also click the padlock icon on the address bar and inspect the certificate’s details.

Copy Link

Where are SSL certificates stored in XAMPP?

The SSL directory should contain the Apache folder. For example, you can store the certificates in xamppapachessl. There isn’t a default directory.

Copy Link

Save 10% on SSL Certificates when ordering today!

Fast issuance, strong encryption, 99.99% browser trust, dedicated support, and 25-day money-back guarantee. Coupon code: SAVE10

Written by

Experienced content writer specializing in SSL Certificates. Transforming intricate cybersecurity topics into clear, engaging content. Contribute to improving digital security through impactful narratives.