---
title: "Redirect HTTP to HTTPS with your own hosting"
---

> **Warning**
>
> **This documentation is for Bolder sites that use their own hosting**

## Steps

1.  ### Log in to your hosting account
    

Log in to your hosting provider's control panel (such as iPage, Bluehost or whichever service you use).

2.  ### Open the File Manager
    

Use the File Manager tool to navigate to the website's root directory. This directory is usually called `public_html` .

3.  ### Create or edit the .htaccess file
    

Locate the `.htaccess` file. If it does not exist, create a new one. Add the following code to force the redirect to HTTPS:

`RewriteEngine On`

`RewriteCond %{HTTPS} off`

`RewriteRule ^(.*)$ [https://%{HTTP_HOST}%{REQUEST_URI](https://%{HTTP_HOST}%{REQUEST_URI)} [L,R=301]`

4.  ### Save and close the file
    

Save the changes and close the file editor.

## Example steps for cPanel (if applicable):

1.  Log in to cPanel
2.  Open the File Manager
3.  Navigate to the document root directory:
    
    Go to the domain's document root directory (often `public_html` ).
    
4.  Edit/Create the .htaccess file

Find the `.htaccess` file and edit it, or create a new one if it does not exist.

Add the following redirect code:

`RewriteEngine On`

`RewriteCond %{HTTPS} off`

`RewriteRule ^(.*)$ [https://%{HTTP_HOST}%{REQUEST_URI](https://%{HTTP_HOST}%{REQUEST_URI)} [L,R=301]`

## If you have access to the Apache server where your site is hosted

You can find the file to modify in one of the following locations:

-   `/etc/apache2/sites-available/`
-   `/etc/httpd/conf.d/`
-   `/etc/apache2/apache2.conf`

**Add or modify the VirtualHost configuration:**

Add the following configuration block to the website's configuration file:

\<VirtualHost \*:80>
    ServerName tiendabootic.cl
    ServerAlias www.tiendabootic.cl
    Redirect "/" "https://www.tiendabootic.cl/"
\</VirtualHost>

**Restart the server:**

sudo systemctl restart apache2

The following considerations are based on the team's knowledge from running curl against the URL provided. We are happy to assist you in more depth if we have credentials or access to your hosting and domain provider.
