# How do I force browsers to enter my website with HTTPS? It automatically enters with HTTP!

**URL:** <https://forum.infinityfree.com/t/how-do-i-force-browsers-to-enter-my-website-with-https-it-automatically-enters-with-http/74422>\
**Category:** Hosting Support\
**Created:** [April 6, 2023, 7:36am UTC](https://forum.infinityfree.com/t/how-do-i-force-browsers-to-enter-my-website-with-https-it-automatically-enters-with-http/74422 "2023-04-06T07:36:57Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![anon77765702](https://forum.infinityfree.com/letter_avatar/anon77765702/32/5_5575768a8748004e209b776fc1b2916d.png) [@anon77765702](https://forum.infinityfree.com/u/anon77765702)\
**Post date:** [April 6, 2023, 7:41am UTC](https://forum.infinityfree.com/t/how-do-i-force-browsers-to-enter-my-website-with-https-it-automatically-enters-with-http/74422/2 "2023-04-06T07:41:56Z")

</div>

You need to correct visitors to https:// protocol.  
If you connect to your site with: [https://sanacionpendulohebreo.com/?i=1](https://sanacionpendulohebreo.com/?i=1)  
it shows it as secure.

```plaintext
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:CF-Visitor} !{"scheme":"https"}
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

```

Insert this code into your .htaccess and it will force all traffic to HTTPS.  
(found from [How to force all traffic to HTTPS](https://forum.infinityfree.com/t/how-to-force-all-traffic-to-https/49322))

---

_[View the full topic](https://forum.infinityfree.com/t/how-do-i-force-browsers-to-enter-my-website-with-https-it-automatically-enters-with-http/74422)._
