<p>You could try and add the following condition to the .htaccess which should redirect everything to http, perhaps it'll work: </p>

<pre><code>RewriteCond %{HTTPS} off
</code></pre>

CC BY-SA 3.0
2017-11-28T11:30:50.163Z
2017-11-28T11:30:50.163Z
Gįëł Tėttëłæår
<p>I got the link to work, but it seems like a dumb workaround. For some reason, <code>http://example.com</code> redirects to <code>https://example.com</code> when I use {{ entry.Url }}, but when I use <code>http://www.</code> the redirect doesn't occur. I changed my Site Url to <code>www.</code> and created a redirect to <code>www.</code> in the .htaccess file.</p>

CC BY-SA 3.0
2017-09-29T03:43:28.843Z
2017-09-29T03:43:28.843Z
Jeff Fulton
<p>{{ entry.url }} is generating a https:// link. I don't have SSL on this site, so the page errors out.</p>

<p>Settings > General > Site Url is "http://..."</p>

<p>My .htaccess is below (though I've read the redirect doesn't work on shared hosting).</p>

<pre><code>    RewriteEngine On
    RewriteBase /
    RewriteCond %{SERVER_PORT} 443
    RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</code></pre>

<p>Aside from "Get an SSL certificate," any suggestions on a fix?</p>

CC BY-SA 3.0
2017-09-29T00:31:24.200Z
Are you setting siteUrl dynamically in public index.php or config/general.php?  Can you share them?  Do you have any plugins installed that interfere with siteUrl or link creation?
Brad Bell
CC BY-SA 3.0
2017-09-29T00:56:03.273Z
In config/general.php siteUrl is null... I have two plugins: contactform and simplemap. I don't think either of those would interfere.
Jeff Fulton
CC BY-SA 3.0
2017-09-29T02:22:13.020Z
I got the link to work, but it seems like a dumb workaround. For some reason, `http://example.com` redirects to `https://example.com` when I use {{ entry.Url }}, but when I use `http://www`. the redirect doesn't occur. I changed my Site Url to www. and created a redirect to www. in the .htaccess file.
Jeff Fulton
CC BY-SA 3.0
2017-09-29T02:26:51.727Z
I think the problem may be with HSTS, but I don't know enough about it to know if I'm right or not... also, it was only redirecting like this on mobile. Super weird.
Jeff Fulton
CC BY-SA 3.0
2017-09-29T03:16:44.197Z
HSTS is a Chrome only thing and you have to specifically register that domain with Google saying you want to opp-in to HSTS.  Is that something you did?
Brad Bell
CC BY-SA 3.0
2017-09-29T03:42:15.727Z
Then it's not that... I'm having the redirect problems on Safari iOS.
Jeff Fulton
<url><htaccess><link>
entry.url forcing https
# entry.url forcing https

(Asked by: username_0 on 2017-09-28)

{{ entry.url }} is generating a https:// link. I don't have SSL on this site, so the page errors out.
Settings > General > Site Url is "http://..."
My .htaccess is below (though I've read the redirect doesn't work on shared hosting).
    RewriteEngine On
    RewriteBase /
    RewriteCond %{SERVER_PORT} 443
    RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Aside from "Get an SSL certificate," any suggestions on a fix?

**Tags:** url, htaccess, link

> **Comments:**
> **username_1**: Are you setting siteUrl dynamically in public index.php or config/general.php?  Can you share them?  Do you have any plugins installed that interfere with siteUrl or link creation?  
> **username_0**: In config/general.php siteUrl is null... I have two plugins: contactform and simplemap. I don't think either of those would interfere.  
> **username_0**: I got the link to work, but it seems like a dumb workaround. For some reason, `http://example.com` redirects to `https://example.com` when I use {{ entry.Url }}, but when I use `http://www`. the redirect doesn't occur. I changed my Site Url to www. and created a redirect to www. in the .htaccess file.  
> **username_0**: I think the problem may be with HSTS, but I don't know enough about it to know if I'm right or not... also, it was only redirecting like this on mobile. Super weird.  
> **username_1**: HSTS is a Chrome only thing and you have to specifically register that domain with Google saying you want to opp-in to HSTS.  Is that something you did?  
> **username_0**: Then it's not that... I'm having the redirect problems on Safari iOS.  

---

## 2 answers

### Answer by username_2 on 2017-11-28. Score: 1

You could try and add the following condition to the .htaccess which should redirect everything to http, perhaps it'll work: 
RewriteCond %{HTTPS} off


---

### Answer by username_0 on 2017-09-29. Score: 1

I got the link to work, but it seems like a dumb workaround. For some reason, `http://example.com` redirects to `https://example.com` when I use {{ entry.Url }}, but when I use `http://www.` the redirect doesn't occur. I changed my Site Url to `www.` and created a redirect to `www.` in the .htaccess file.


---

