Answers.Body: <p>In example.com.nginx.ssl.conf need to insert:</p>
  
  <pre><code>location / {
      try_files $uri/index.html $uri $uri/ /index.php?$query_string;
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-04T07:42:40.123Z
Answers.LastActivityDate: 2018-09-04T07:42:40.123Z
Answers.UserDisplayName: Vitaliy  Badalov
Answers.Body: <p>Change your site url in your config file.</p>
  
  <p>Add a 301 redirect to your htaccess to send requests for http to https.</p>
  
  <pre><code># Redirect http to https
  RewriteCond %{HTTP:X-Forwarded-Proto} !=https
  RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  </code></pre>
  
  <p>If that doesn't work for you then I suggest doing some Google searching. There are hundreds of guides on how to redirect http to https.</p>
  
  <p>That's all you need to do.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-03T10:37:37.627Z
Answers.Text: I've added an example for you. But you could have done a quick Google search to find out how to do it. If you look over to the right on this page you'll probably see a few posts dealing with the same thing.
Answers.UserDisplayName: foamcow
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-03T11:06:37.267Z
Answers.Text: I did everything as in this article https://craftcms.com/support/force-ssl , but it did not help
Answers.UserDisplayName: Vitaliy  Badalov
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-03T16:11:42.317Z
Answers.Text: Can you give some more information? What happens? Do you get an error or does it simply not redirect? Perhaps update your question with the contents of your htaccess file to help someone debug/understand the issue. Are you using Craft 2 or Craft 3. What is your hosting environment?
Answers.UserDisplayName: foamcow
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-03T18:47:43.457Z
Answers.Text: I update answer
Answers.UserDisplayName: Vitaliy  Badalov
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-03T10:08:32.190Z
Answers.LastActivityDate: 2018-09-03T10:36:33.140Z
Answers.LastEditDate: 2018-09-03T10:36:33.140Z
Answers.UserDisplayName: foamcow
Body: <p>I added support for https for the domain, But only the main page works How to make Сraft make the default site address with https instead of http?</p>
  
  <p>Upd: Craft 3 on Vestacp and centos. Only the base url and static resources work, that is, only what is actually available. A craft path produces 404, for example, an example.com/admin</p>
  
Tags: <https>
Title: transfer to HTTPS
ThreadText: # transfer to HTTPS
  
  (Asked by: username_0 on 2018-09-03)
  
  I added support for https for the domain, But only the main page works How to make Сraft make the default site address with https instead of http?
  
  Upd: Craft 3 on Vestacp and centos. Only the base url and static resources work, that is, only what is actually available. A craft path produces 404, for example, an example.com/admin
  
  **Tags:** https
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2018-09-04. Score: 1 | Accepted answer
  
  In example.com.nginx.ssl.conf need to insert:
  
  ```
  location / {
      try_files $uri/index.html $uri $uri/ /index.php?$query_string;
  }
  
  ```
  
  
  ---
  
  ### Answer by username_1 on 2018-09-03. Score: 2
  
  Change your site url in your config file.
  
  Add a 301 redirect to your htaccess to send requests for http to https.
  
  ```
  # Redirect http to https
  RewriteCond %{HTTP:X-Forwarded-Proto} !=https
  RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  
  ```
  
  If that doesn't work for you then I suggest doing some Google searching. There are hundreds of guides on how to redirect http to https.
  
  That's all you need to do.
  
  > **Comments:**
  > **username_1**: I've added an example for you. But you could have done a quick Google search to find out how to do it. If you look over to the right on this page you'll probably see a few posts dealing with the same thing.  
  > **username_0**: I did everything as in this article https://craftcms.com/support/force-ssl , but it did not help  
  > **username_1**: Can you give some more information? What happens? Do you get an error or does it simply not redirect? Perhaps update your question with the contents of your htaccess file to help someone debug/understand the issue. Are you using Craft 2 or Craft 3. What is your hosting environment?  
  > **username_0**: I update answer  
  
  ---
  
  