How to associate a private key (.key) file to a ssl certificate (from GoDaddy) to install on IIS

3 min read 26-10-2024
How to associate a private key (.key) file to a ssl certificate (from GoDaddy) to install on IIS

Installing an SSL certificate on Internet Information Services (IIS) is a crucial step for securing your website. However, it can become complex when you need to associate a private key file (.key) with your SSL certificate from GoDaddy. This guide will walk you through the steps to successfully achieve this, ensuring that your website is secure and trustworthy.

Understanding the Problem

The challenge many face is associating a private key (.key) file with an SSL certificate obtained from GoDaddy before installing it on IIS. A common scenario looks something like this:

I have a GoDaddy SSL certificate and a private key (.key) file, but I don’t know how to link them for installation on IIS.

To put it simply, you need to merge your SSL certificate with the corresponding private key to create a certificate file that IIS can use.

Steps to Associate a Private Key with SSL Certificate

1. Export the SSL Certificate from GoDaddy

When you receive your SSL certificate from GoDaddy, download it and unzip the file. Inside, you should find multiple files including:

  • your_domain_name.crt (the actual SSL certificate)
  • A CA bundle file, usually named gd_bundle-g2-g1.crt or something similar.

2. Prepare the Private Key

Ensure you have your private key file (.key) accessible. This file was created when you generated a Certificate Signing Request (CSR). If you don’t have it, you cannot proceed without generating a new CSR and private key.

3. Combine the SSL Certificate and Private Key

You will need to convert your private key and SSL certificate into a format that IIS accepts, usually a .pfx file. You can do this using the OpenSSL tool. Here is how to create a .pfx file:

  1. Download and Install OpenSSL (if you don’t have it)

  2. Open a Command Line Interface (Terminal or Command Prompt)

  3. Run the following command:

    openssl pkcs12 -export -out your_domain_name.pfx -inkey your_private_key.key -in your_domain_name.crt -certfile gd_bundle-g2-g1.crt
    

    Replace your_private_key.key, your_domain_name.crt, and gd_bundle-g2-g1.crt with the actual file names.

  4. Follow the prompts to set a password for your new .pfx file.

4. Install the SSL Certificate on IIS

Now that you have your .pfx file, you can install it on IIS.

  1. Open IIS Manager.
  2. In the Connections pane, select the server node.
  3. Double-click on "Server Certificates" in the middle pane.
  4. Click on "Import..." in the Actions pane.
  5. Browse to your .pfx file and enter the password you set earlier.
  6. Click OK to complete the import.

5. Assign the SSL Certificate to Your Website

Once the certificate is installed, you can assign it to a website:

  1. Select your website in the Connections pane.
  2. In the Actions pane, click on “Bindings…”
  3. Click "Add..." and select “https” as the type.
  4. Choose your SSL certificate from the dropdown list.
  5. Click OK and then close the Site Bindings window.

Conclusion

Associating a private key file with an SSL certificate from GoDaddy for IIS installation may seem daunting, but following the steps above will simplify the process. Make sure to keep your private key secure and handle it with caution. Properly setting up SSL not only secures your website but also enhances trust among your visitors.

Additional Resources

By following this guide, you should now have a secure website with your SSL certificate correctly installed and associated with the private key.