# How to Force SSL

You just installed SSL, but you can't find the secured padlock and HTTPS in front of your domain. Instead, your domain still loads with HTTP, and the insecure icon warns visitors to beware of your site.

{% hint style="info" %}
This could be due to some unsecured links on your website. You will need to manually force SSL to ensure your site is fully secure.
{% endhint %}

### Step 1: Confirm SSL Installation

First, ensure that SSL has been properly installed on your site. To do this, visit [SSL Shopper](https://www.sslshopper.com) to verify if the SSL is installed correctly.

Next, check why the padlock is not showing up in the browser by visiting [Why No Padlock](https://www.whynopadlock.com).

Simply type in the full URL of your website and get a detailed report about your SSL installation.

{% hint style="info" %}
If you find any unsecured elements or errors, these will need to be addressed before proceeding.
{% endhint %}

### Step 2: Forcing SSL with .htaccess

1. After confirming SSL is installed, you can force HTTPS by editing your `.htaccess` file in your hosting panel.
2. Navigate to **File Manager** in your hosting panel and open the `public_html` folder.
3. Locate and open the `.htaccess` file. If you cannot find it, ensure hidden files are visible, or create a new `.htaccess` file.
4. Scroll down to find the line `RewriteEngine On`.
5. Insert the following code right below it:

   ```bash
   RewriteEngine On
   RewriteCond %{HTTP_HOST} clouduxe.com [NC]
   RewriteCond %{SERVER_PORT} 80
   RewriteRule ^(.*)$ https://clouduxe.com/$1 [R,L]
   ```
6. Save the changes.

{% hint style="success" %}
Congratulations! You have successfully forced HTTPS on your site.
{% endhint %}

### Step 3: Verify the Changes

Go back to your browser, refresh the page, and check to see if the padlock appears. For extra confirmation, refresh the information on [Why No Padlock](https://www.whynopadlock.com) to ensure that your site is fully secured.

{% hint style="warning" %}
If the padlock still doesn’t appear, check for mixed content errors, which might occur if some resources on your site (like images or scripts) are still being loaded over HTTP.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.clouduxe.com/ssl/how-to-force-ssl.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
