Pagely Guide

Pagely Guide

How to Add an SSL Certificate to Your Website


Securing your website with an SSL certificate is crucial for protecting user data and enhancing trust. SSL (Secure Sockets Layer) encrypts the data transferred between the server and the user’s browser, ensuring privacy and data integrity. This guide will walk you through the process of adding an SSL certificate to your website, covering both free and paid options. It is designed to be easy to follow for both non-developers and developers.

Wordpress SSL

For Website Owners

Using SSL certificates ensures that your website:

  • Secures Data: Encrypts data exchanged between the server and the user, protecting sensitive information.
  • Builds Trust: Enhances user trust and confidence with a secure connection.
  • Improves SEO: Google and other search engines prefer HTTPS sites, potentially improving your search engine ranking.

For Developers

SSL certificates are essential for:

  • Compliance: Meeting security standards and regulations.
  • Security: Preventing data breaches and protecting user information.
  • Performance: Taking advantage of HTTP/2 for faster load times with HTTPS.

Before you start, ensure you have the following:

  • Access to your server via SSH or hosting control panel
  • Domain name and website hosted on Pagely
  • For paid SSL: A purchased SSL certificate from a trusted Certificate Authority (CA)

Free SSL Certificate with Let’s Encrypt

Step 1: Install Certbot

Certbot is a tool that automates the process of obtaining and renewing SSL certificates from Let’s Encrypt.

Connect to your server using SSH:

bash 
ssh username@your-server.com
  1. Replace username with your actual SSH username and your-server.com with your server’s address.

Install Certbot on your server. For example, on Ubuntu:

bash
sudo apt-get update
sudo apt-get install certbot

Step 2: Obtain an SSL Certificate

Run Certbot to obtain and install the SSL certificate:

bash
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com
  1. Replace yourdomain.com with your actual domain name.
  2. Follow the on-screen instructions to complete the installation.

Step 3: Set Up Automatic Renewal

Let’s Encrypt certificates are valid for 90 days. To automatically renew the certificate, add a cron job:

bash
crontab -e

Add the following line to the crontab file:

bash
0 0 * * * /usr/bin/certbot renew --quiet

This will check for renewal daily and renew if necessary.


Step 1: Purchase an SSL Certificate

Buy an SSL certificate from a trusted Certificate Authority (CA) like DigiCert, or Symantec.

Step 2: Generate a CSR (Certificate Signing Request)

Connect to your server using SSH:

bash
ssh username@your-server.com
  1. ​Generate a private key and CSR:
bash
openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.com.key
-out yourdomain.com.csr
  1. Replace yourdomain.com with your actual domain name. Follow the prompts to enter your domain information.
  2. Submit the CSR to your CA to receive your SSL certificate files.

Step 3: Install the SSL Certificate

  1. Upload the SSL certificate files to your server.

Configure your web server to use the SSL certificate.

For Nginx, edit your site configuration file (usually located in

/etc/nginx/sites-available/):
bash
server {
listen 443 ssl;
server_name yourdomain.com www.yourdomain.com;
ssl_certificate /path/to/yourdomain.com.crt; ssl_certificate_key /path/to/yourdomain.com.key;
# Add other SSL options and your site configuration here
}
  1. ​Test your Nginx configuration and reload: bash
sudo nginx -t
sudo systemctl reload nginx

  1. Certificate Not Trusted

Issue: Browser shows a “Not Trusted” warning.

Solution: Ensure you have installed the intermediate certificate provided by your CA. For Let’s Encrypt, this is typically handled automatically by Certbot.

  1. Mixed Content Warnings

Issue: Your site loads with mixed content warnings.

Solution: Ensure all resources (images, scripts, stylesheets) are loaded over HTTPS. Update URLs in your site’s content and configuration.

  1. Renewal Issues

Issue: Automatic renewal fails.

Solution: Check the Certbot logs for errors (/var/log/letsencrypt/). Ensure your cron job is set up correctly and that Certbot has permission to renew the certificate.

  1. Configuration Issues

Issue: Incorrect web server configuration.

Solution: Ensure your web server configuration file is correctly set up to handle SSL connections. Check the syntax and reload the configuration.


Useful Plugins

For website owners who are not developers, there are several WordPress plugins that can help simplify the process of adding an SSL certificate:

  1. Really Simple SSL
    • Features: Automatically detects your settings and configures your website to run over HTTPS.
    • How to Use: Install the plugin from the WordPress plugin repository, then activate it and follow the on-screen instructions.

  1. SSL Insecure Content Fixer
    • Features: Fixes mixed content warnings by ensuring all URLs load over HTTPS.
    • How to Use: Install the plugin, activate it, and configure the settings as needed.

Additional Suggestions

  1. Regular Backups: Always make a backup of your site before performing any SSL installation operations. This ensures you can restore your site in case anything goes wrong.
  2. Testing on a Staging Site: Test the SSL installation on a staging site first to ensure everything works correctly before applying changes to your live site.
  3. Seek Professional Help: If you’re unsure about performing these tasks, consider hiring a professional or contacting Pagely support for assistance.

Adding an SSL certificate to your website is essential for securing data and building trust with your users. By following this guide, Pagely customers can efficiently add SSL certificates to their websites, ensuring enhanced security and performance. For non-developers, using recommended plugins can simplify the process while ensuring your site remains functional and secure.

For more support, visit our Pagely Support page.