SSL Installation Guide for Azure

SSL (Secure Sockets Layer) makes the connection between your website/API and users safe & encrypted.

It shows a padlock in the browser and converts your website from:

http:// → https://
 

 

Without SSL, the browser shows:

“Your connection is not secure”

 

SSL protects:

  • User login data

  • Payments

  • Personal information

  • API requests (Node server responses)

  • Mobile app → backend communication

This is mandatory for all modern web and mobile apps.

 

What SSL Files Are Required for Azure?

Azure works differently than AWS.

Azure App Service requires a single file: .PFX

This .pfx file contains:

  • SSL certificate

  • Private key

  • CA bundle

  • Password

Client must provide:

  1. certificate.pfx (main file)

  2. PFX password (very important)

If the client gives only:

  • .crt

  • .key

  • ca-bundle.crt

 

Then you (or the client) must convert to .pfx.

I can also give you the exact conversion command if needed.

 

Azure Hosting Type Matters

There are 2 ways Node.js is hosted on Azure:

  1. Azure App Service (most common)

  2. Azure Virtual Machine (VM) using Nginx/Apache

Steps for both are given below.

 

INSTALL SSL ON AZURE APP SERVICE (Recommended)

Step 1 — Login to Azure Portal

GoTo

https://portal.azure.com
 

 

Search for App Services

Select your Node.js App Service.

 

Step 2 — Open TLS/SSL Settings

Inside your app:

Left Sidebar →
TLS/SSL Settings → Certificate blade.

 

Step 3 — Upload the SSL Certificate

Click:

Private Key Certificates (.pfx)
→ Upload Certificate

Upload:

  • Your certificate.pfx

  • Enter the PFX password

Click Upload.

 

Step 4 — Bind the SSL to Your Domain

Go to:

Custom domains → Select your domain → Click Add binding.

You will see options like:

  • SNI SSL

  • IP SSL

Choose: SNI SSL (recommended & cheaper)

Select your recently uploaded SSL certificate.

Click Add Binding.

 

Step 5 — Restart the App Service

After binding:

  • Go to Overview

  • Click Restart

This ensures Node.js picks the HTTPS configuration.

 

Step 6 — Verify SSL

Open your website or API:

https://yourdomain.com
 

 

How Node.js Works Automatically on HTTPS?

You do NOT need to modify your Node.js code when using Azure App Service.

Azure automatically routes:

  • HTTP → HTTPS

  • Provide SSL termination in front of your Node.js app

 

INSTALL SSL ON AZURE VM (NODE + NGINX)

If you are hosting Node on an Azure VM (Ubuntu/CentOS), use Nginx.

Files Required:

The client must provide:

  • certificate.crt

  • private.key

  • ca-bundle.crt (or intermediate)

 

Step 1 — Connect to Your VM

Using SSH:

ssh azureuser@your-vm-ip
 

 

Step 2 — Create SSL Folder

sudo mkdir -p /etc/ssl/mydomain/
 

 

Upload:

  • certificate.crt

  • private.key

  • ca-bundle.crt

 

Step 3 — Update Nginx Config

Open default config:

sudo nano /etc/nginx/sites-available/default
 

 

Add

server {
    listen 443 ssl;

    ssl_certificate /etc/ssl/mydomain/certificate.crt;
    ssl_certificate_key /etc/ssl/mydomain/private.key;
    ssl_trusted_certificate /etc/ssl/mydomain/ca-bundle.crt;

    location / {
        proxy_pass http://localhost:3000;
    }
}

server {
    listen 80;
    return 301 https://$host$request_uri;
}
 

 

Step 4 — Restart Nginx

sudo systemctl restart nginx
 

 

Step 5 — Verify SSL

Visit:

https://yourdomain.com
 

 

When Using Azure VM — Node.js Does NOT Handle SSL

SSL is terminated at:

  • Nginx (443 port)
    Node only runs on:

  • HTTP → port 3000

So Node.js code does not change.

 

Checklist for Clients

Azure App Service Needs:

  • .pfx file

  • PFX password

  • Domain added in custom domains

  • DNS A record or CNAME pointing to Azure

 

Azure VM Needs:

  • .crt

  • .key

  • ca-bundle.crt

  • SSH access

  • Nginx installed

 

Share:
Related Blogs
SSL Installation Guide for Azure

SSL Installation Guide for Azure

SSL (Secure Sockets Layer) makes the connection between your website/API and users safe & encrypted.

SSL Installation on AWS

SSL Installation on AWS

SSL (Secure Sockets Layer) is a security technology that protects the data exchanged between a user’s browser and your website or application.

Set Up Amazon S3 for Website Storage and Speed Optimization

Set Up Amazon S3 for Website Storage and Speed Optimization

When running a website, one of the biggest challenges is fast loading speed. Images, videos, and downloadable files can make a site heavy and slow. To solve this, businesses use Amazon S3 (Simple Storage Service) — a secure, reliable, and cost-effective cloud storage solution from AWS.

Our Partners