-1

Not that long ago i let my hosting add an ssl certificate to one of my domains. There are now multiple problems with it.

Problem 1 When i visit the website without adding www,http or anything else (just the domain) it doesnt redirect to https it just goes to the domain name. for example if i go to test.com it wont add the https.

Problem 2 When i visit my domain name with https in front it shows me the green https mark for like 1 mili second and then it dissapears again and tells me the site is not secured when i click on the information icon next to the url.

Problem 3

When i go to my wp-admin it shows me the green https signs like it should normally.

Does anyone know why this is happening? Im using a multi site network with the domain mapping plugin.

Kevin.a
  • 4,094
  • 8
  • 46
  • 82

1 Answers1

1

Problem 1: If your >Settings>General is displaying https:// in both site Address & Wordpress Address - should be fine, but you could also edit your wpconfig.php file and add

define( 'WP_SITEURL', 'https://www.yourdomain.com' );
define( 'WP_HOME', 'https://www.yourdomain.com' );

Additionally, if you have access to your .htaccess file, you could add:

<IfModule mod_rewrite.c>  
    RewriteEngine On  
    RewriteCond %{SERVER_PORT} 443  
    RewriteRule ^(.*)$ https://yourdomain.com/$1 [R,L]
</IfModule>

Problem 2: Sounds like a "Mixed content" problem. If any images (as example) are hard coded to http://, it can cause this issue.

Simple to fix though, install a plugin like "SSL Insecure Content Fixer" (there are others also). Then under your Settings menu, you will now see a "SSL Insecure Content" menu - under that, choose the "Capture" setting (2nd last), and at bottom under HTTPS detection, choose best option (e.g. HTTP_X_FORWARDED_PROTO) and save changes - you should be good to go!

Problem 3: If I am correct, this is not a problem - once you fix mixed content - all should be fine...

I hope this helps point you in the right direction...

Jimmy
  • 242
  • 1
  • 3
  • 9
  • Hi thanks for your reply most of the problems are now fixed. Problem one is .. well still a problem sadly. Everytime i go to the domain without https in fron it will go to the domain without https in front. what i want is when i visit the domain like test.com it must redirect to (https://)test.com – Kevin.a Aug 23 '17 at 09:01
  • 1
    DNS? You should be able to setup "*.domain.com" as a C Name pointing to your main www. (www.domain.com)... You can also add code in your htaccess: RewriteEngine on RewriteCond %{HTTP_HOST} ^example.com [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC] – Jimmy Aug 23 '17 at 22:59