Title: Cannot set the front page as Https
Last modified: June 8, 2017

---

# Cannot set the front page as Https

 *  [cathymanchi](https://wordpress.org/support/users/cathymanchi/)
 * (@cathymanchi)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/cannot-set-the-front-page-as-https/)
 * _[ Moderator note: [moved to Fixing WordPress](https://wordpress.org/support/topic/before-posting-in-everything-wordpress/?view=all).]_
 * When I input the URL: cmpmanchi.com via browser, it show http only, how can I
   set the default front page as https? Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [krisjl](https://wordpress.org/support/users/krisjl/)
 * (@krisjl)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/cannot-set-the-front-page-as-https/#post-9208601)
 * Hello,
 * The following guide should give all the information you need to help you implement
   https on your site:
 * [https://make.wordpress.org/support/user-manual/web-publishing/https-for-wordpress/](https://make.wordpress.org/support/user-manual/web-publishing/https-for-wordpress/)
 * Hope that helps.
 *  [wbcomdesigns](https://wordpress.org/support/users/wbcomdesigns/)
 * (@wbcomdesigns)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/cannot-set-the-front-page-as-https/#post-9208710)
 * Hello [@cathymanchi](https://wordpress.org/support/users/cathymanchi/)
 * You can achieve this using one of the following solution
 * 1. Go to Settings >> General and make sure that the WordPress Address (URL) and
   Site Address (URL) is https. If not, add S after http to make https and save 
   it.
    This is ensure that your all content of a webpage is served from HTTPS URL
   when you will use HTTPS url. The HTTP URL, will however work normally in parallel
   as both ports are different.
 * 2. You can change your .htaccess accordingly
 * <IfModule mod_rewrite.c>
    RewriteEngine On RewriteBase /
 * **RewriteCond %{HTTPS} !=on
    RewriteRule ^ [https://%](https://%){HTTP_HOST}%{
   REQUEST_URI} [L,R=302]
 * # BEGIN WordPress
    RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME}!-
   f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule
   >
 * if it works for you then you can change 302 to 301 redirect which is permanant
   redirection.
 * 3. Here is an alternative solution you can use if you don’t want to edit .htaccess
 *     ```
       add_action( 'template_redirect', 'nonhttps_template_redirect', 1 );
   
       function nonhttps_template_redirect() {
   
          if ( is_ssl() ) {
   
              if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'https' ) ) {
   
                  wp_redirect( preg_replace( '|^http://|', 'https://', $_SERVER['REQUEST_URI'] ), 301 );
   
                  exit();
   
              } else {
   
                  wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 301 );
   
                  exit();
   
              }
   
          }
   
       }
       ```
   
 * You can place this at the bottom of your theme functions.php
 * Hope it will help
 * Thanks
    -  This reply was modified 9 years, 4 months ago by [wbcomdesigns](https://wordpress.org/support/users/wbcomdesigns/).

Viewing 2 replies - 1 through 2 (of 2 total)

 The topic ‘Cannot set the front page as Https’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [wbcomdesigns](https://wordpress.org/support/users/wbcomdesigns/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/cannot-set-the-front-page-as-https/#post-9208710)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
