Enabling SSL for just one page, or excluding one page or URL

Why SSL on one page?

If you don’t want to move to SSL entirely because you’re afraid to lose your ranking, don’t worry. If you redirect your site with 301 permanent redirects, this does not happen.

Still, there might be some use case to only enable SSL on a specific page. For instance, your site might use a service that doesn’t support SSL/HTTPS. Trying to get that service to start supporting SSL is always the preferred solution. But if you’ve got your mind set on enabling SSL on just one page, you can do so.

The manual solution

You can do this manually as described below.

  1. Open your preferred FTP software (e.g. FileZilla, CyberDuck)
  2. Navigate to the root folder of your website
  3. Find the .htaccess file. In some cases you have to enable the “Show hidden files” option before the file becomes visible
  4. Open the .htaccess file in a text editor

Then add the following lines above the WordPress redirect rules in your .htaccess file. (Remember: if you are in a subdirectory (website/subsite) you have to add the subsite before the page.)

 RewriteEngine on
 RewriteCond %{HTTPS} !=on [NC]
 RewriteCond $1 /your-page-on-ssl/
 RewriteRule ^(.*) https://%{HTTP_HOST}%/$1 [R=301, L]

If you change it to this:

RewriteCond %{REQUEST_URI} !/your-page-on-ssl/

The redirect will not take place on that URL.

If your site is still redirecting, you might have to leave the homeurl and siteurl on http, using safe mode.

Simple and Performant Security.
Easily improve site security with WordPress Hardening, Two-Factor Authentication (2FA), Login Protection, Vulnerability Detection and SSL certificate generation.
document.addEventListener('DOMContentLoaded', function() { /* ========================================================================== Post Info Labels - WCAG 1.3.1 Info and Relationships Adds context for screen readers (author, date, time) ========================================================================== */ document.querySelectorAll('.elementor-post-info__item--type-author').forEach(function(el) { var name = el.textContent.trim(); var parent = el.closest('a') || el.closest('li'); if (parent && name) { parent.setAttribute('aria-label', 'Author: ' + name); } }); document.querySelectorAll('.elementor-post-info__item--type-date').forEach(function(el) { var date = el.textContent.trim(); var parent = el.closest('li'); if (parent && date) { parent.setAttribute('aria-label', 'Published: ' + date); } }); document.querySelectorAll('.elementor-post-info__item--type-time').forEach(function(el) { var time = el.textContent.trim(); var parent = el.closest('li'); if (parent && time) { parent.setAttribute('aria-label', 'Time: ' + time); } }); });