SSL Server Configuration Instructions on Windows IIS (web.config) or Linux Apache(htaccess)

WordPress websites or regular websites nowadays require HTTPS to be accepted by some modern browsers. Not having SSL forced on your website can mean the difference between a visitor staying on your website or getting an ALARMING warning by the web browser.

Below are some configuration options to make sure that you don’t miss traffic and that your website is trusted by your visitors:

Windows Server (web.config) method:

Create a file name web.config in your root path on your website and place the following contents inside of it:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<clear />
<rule name="EasySSL.cc Redirect to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />
</rule>
<rule name="EasySSL.cc WordPress Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

If you’re using Linux Hosting / Apache or Nginx, you can use the following instructions:

Create a file name .htaccess in your root path on your website and place the following contents inside of it:

# BEGIN WordPress EasySSL.cc

# inform php that mod_rewrite is enabled
SetEnv HTTP_MOD_REWRITE on
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress EasySSL.cc