To enable SSL and secure your WordPress website with HTTPS, follow these steps:
Step 1: Enable Let s Encrypt SSL in DirectAdmin
Log in to your DirectAdmin control panel.
Navigate to Account Manager SSL Certificates.
Select Free & automatic certificate from Let s Encrypt.
Choose the domain and subdomains you want to secure.
Click Save and wait for the SSL to be issued.
Step 2: Update WordPress to Use HTTPS
Log in to your WordPress Dashboard.
Go to Settings General.
Update the WordPress Address (URL) and Site Address (URL) from http://
to https://
.
Click Save Changes.
Step 3: Redirect HTTP to HTTPS (Optional)
To force HTTPS, add the following lines to your .htaccess
file:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]