Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-28T11:30:50.163Z
Answers.LastActivityDate: 2017-11-28T11:30:50.163Z
Answers.UserDisplayName: Gįëł Tėttëłæår
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-29T03:43:28.843Z
Answers.LastActivityDate: 2017-09-29T03:43:28.843Z
Answers.UserDisplayName: Jeff Fulton
Body: <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>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-29T00:31:24.200Z
Comments.Text: 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?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-29T00:56:03.273Z
Comments.Text: In config/general.php siteUrl is null... I have two plugins: contactform and simplemap. I don't think either of those would interfere.
Comments.UserDisplayName: Jeff Fulton
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-29T02:22:13.020Z
Comments.Text: 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.
Comments.UserDisplayName: Jeff Fulton
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-29T02:26:51.727Z
Comments.Text: 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.
Comments.UserDisplayName: Jeff Fulton
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-29T03:16:44.197Z
Comments.Text: 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?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-29T03:42:15.727Z
Comments.Text: Then it's not that... I'm having the redirect problems on Safari iOS.
Comments.UserDisplayName: Jeff Fulton
Tags: <url><htaccess><link>
Title: entry.url forcing https
ThreadText: # 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.
  
  
  ---
  
  