Really Simple SSL

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.

Sometimes your site become a bit slower when on SSL. This might be especially noticeable when you have a lot of resources loading from external domains. Or your site might use a service that doesn’t support SSL. Trying to get that service to start supporting SSL would be the best solution of course. But if you’ve got your mind set on enabling SSL on just one page, you can.

The plugin solution: Really Simple SSL per page

To be able to offer a solution that supports this, I’ve developed a plugin that handles this for you. You’ll have to deactivate the free plugin, and then install Really Simple SSL per page.

The manual solution

You could do this manually as described below. This won’t give you the mixed content fixer, though.

  1. Go to your FTP program
  2. Look for the root of your website
  3. Find the .htaccess file. Sometimes you have to enable the “Show hidden files” option
  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.



Related articles

4 Responses

  1. I tried using this and reversed it to enforce non-ssl, but it throws a 500 error.

    RewriteEngine on
    RewriteCond %{HTTPS} =on [NC]
    RewriteCond %{REQUEST_URI} /video/
    RewriteRule ^(.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301, L]

    Any thoughts?

        1. I just tested it, it works fine. If you get errors with this, I suggest you remove some lines until it starts working. Simplifying often helps. For example you can remove the https condition, or change the rewrite rule to redirect to another page

          RewriteEngine on
          RewriteCond %{REQUEST_URI} /your-page/
          RewriteRule ^(.*) http://%{HTTP_HOST}/another-page/ [L]

Leave a Reply

Join our mailing list - 8 Tips & Tricks in your inbox over the next 8 weeks!

Integrate with Really Simple SSL

Really Simple SSL offers a Free SSL Certificate from Let’s Encrypt. Do you want to integrate with Really Simple SSL as a hosting provider? Let us know!

Choose the answer that most closely resembles your proposed integration. Additional information can be entered below.
After sending the form. The pop-up will close automatically.