1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HTTP to HTTPS redirect

Discussion in 'Black Hat SEO' started by derago21, Jan 16, 2017.

  1. derago21

    derago21 Jr. VIP Jr. VIP Premium Member

    Joined:
    Oct 24, 2010
    Messages:
    2,397
    Likes Received:
    1,198
    Gender:
    Male
    Occupation:
    Backlinker
    Location:
    Your Brain
    I believe i set it up correctly.

    But when I check my website home page, It says secure.
    But when i click on any of the inner pages, Its not secure.

    Confused, Can someone please help me out.

    Used the above code along with the default .htaccess.
     
  2. Fus3d

    Fus3d Registered Member

    Joined:
    Oct 27, 2016
    Messages:
    72
    Likes Received:
    31
    Is this Wordpress or another CMS? You should also change the URL in the settings.
     
  3. derago21

    derago21 Jr. VIP Jr. VIP Premium Member

    Joined:
    Oct 24, 2010
    Messages:
    2,397
    Likes Received:
    1,198
    Gender:
    Male
    Occupation:
    Backlinker
    Location:
    Your Brain
    It's wordpress, Can you please explain?
     
  4. waqas_ibrahim

    waqas_ibrahim Regular Member

    Joined:
    Nov 14, 2016
    Messages:
    244
    Likes Received:
    121
    Gender:
    Male
    • Thanks Thanks x 1
  5. derago21

    derago21 Jr. VIP Jr. VIP Premium Member

    Joined:
    Oct 24, 2010
    Messages:
    2,397
    Likes Received:
    1,198
    Gender:
    Male
    Occupation:
    Backlinker
    Location:
    Your Brain
  6. waqas_ibrahim

    waqas_ibrahim Regular Member

    Joined:
    Nov 14, 2016
    Messages:
    244
    Likes Received:
    121
    Gender:
    Male
    Not sure, can't tell without looking. How did you edit htaccess??? Yoast?
     
  7. derago21

    derago21 Jr. VIP Jr. VIP Premium Member

    Joined:
    Oct 24, 2010
    Messages:
    2,397
    Likes Received:
    1,198
    Gender:
    Male
    Occupation:
    Backlinker
    Location:
    Your Brain
    I logged into my Cpanel > File manager > .htaccess > edit

    This is how it looks at the bottom, I've highlighted the lines which i added without affecting the original code.

     
  8. Mex

    Mex Jr. VIP Jr. VIP

    Joined:
    Aug 31, 2016
    Messages:
    185
    Likes Received:
    67
    I think that your .htaccess is ok.
    Do you mean that when you click on an inner page the browser tells you that it is not secure even though the url is https?
    In that case you need to be sure that all the files on your page are loading through https as well, images, css, js, etc.
     
    • Thanks Thanks x 1
  9. Fus3d

    Fus3d Registered Member

    Joined:
    Oct 27, 2016
    Messages:
    72
    Likes Received:
    31
    Without seeing the URL I don't think someone will be able to help further as above its probably one of the external resources using http://
     
  10. waqas_ibrahim

    waqas_ibrahim Regular Member

    Joined:
    Nov 14, 2016
    Messages:
    244
    Likes Received:
    121
    Gender:
    Male
    Code:
    <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteCond %{HTTPS} !=on
       RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
    </IfModule>
    
    Please remove the code and this on top of htaccess. I just tested this on my blog.

    Edit: Your code seems fine but I also tried this on my blog and it did not work.
     
    • Thanks Thanks x 1
  11. derago21

    derago21 Jr. VIP Jr. VIP Premium Member

    Joined:
    Oct 24, 2010
    Messages:
    2,397
    Likes Received:
    1,198
    Gender:
    Male
    Occupation:
    Backlinker
    Location:
    Your Brain
    Thanks for your support, If I replace your code, I'm able to access only the homepage.
    I will send you a PM.
     
  12. derago21

    derago21 Jr. VIP Jr. VIP Premium Member

    Joined:
    Oct 24, 2010
    Messages:
    2,397
    Likes Received:
    1,198
    Gender:
    Male
    Occupation:
    Backlinker
    Location:
    Your Brain
    That's correct, But how do i make sure of that?
     
  13. T2tkid

    T2tkid Jr. VIP Jr. VIP Premium Member

    Joined:
    Oct 13, 2010
    Messages:
    3,706
    Likes Received:
    1,698
    Please when you find one that worked for you. I would like to know it as well. I change my site to ssl and only change it in the settings.
     
  14. mainhoondon

    mainhoondon Regular Member

    Joined:
    Jun 15, 2009
    Messages:
    300
    Likes Received:
    125
    Did you find a solution?
    If not, please PM your website url and htaccess file
    I may be able to help :)
     
  15. dabandit

    dabandit Junior Member

    Joined:
    Feb 21, 2008
    Messages:
    141
    Likes Received:
    51
    Go to Settings. General. Change WordPress Address (URL) and Site Address (URL) to the updated https URL. Save.

    Go to Settings. Permalinks. Pick your settings for the permalink you want. Save. Wordpress, if it has write access to .htaccess, will update it.

    ====

    You may need to add 301 redirects for http to https. Also, you can also look into taking advantage of HPKP (HTTP Public Key Pinning) & HSTS (HTTP Strict Transport Security).