1

I had installed ssl certificate on my wordpress website and I had also setup redirect from http to https (301 Redirects), My website pages showing with https in google search but posts are not showing with https, Please help me for solving this issue, Thanks.

1
  • I wrote an answer on this a long time ago... but I cannot find it. :-( But this link may help: make.wordpress.org/support/user-manual/web-publishing/… It is a simple configuration change that has to be done changing a couple of HTTP(s) to HTTPS. You may have to edit some configuration files if you cannot get the web configuration to work. You can look for "http" in your config files and fix. Should only be a couple of places.
    – closetnoc
    Commented May 11, 2015 at 20:21

2 Answers 2

1

The ultimate answer depends on a few factors that aren't clear yet from your post, but these are some specific questions and issues you will want to address:

  1. Did you go to Settings > General in WP Admin and change the WordPress Address and Site Address to https? This is the first action you'll need to take step at a minimum to make sure that posts use the correct base url when displayed.

  2. You didn't mention exactly how you implemented your 301 Redirect (if that's how you want to force http - https) but here's an example that has worked for me in the past:

    
    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80 
    RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L]
    
    I'd recommend manually configuring it vs. using a webhost tool as it gives you more control over the exact behavior your want to impost. Also, if you want to force SSL for the WP Admin or User Login pages, you'll need to update your wp-config.php and add this directive above the "That's all stop editing line":

    define('FORCE_SSL_ADMIN', true);

  3. Do you already have a large base of posts that have been created? If so, the WP Backend may have stored html used in those posts with hard-coded absolute links to external references, css, js, or other media assets that use http vs. https. I've had good luck with the interconnectit.com WordPress Serialized PHP Search Replace Tool - it will comb through your database and allow you to replace serialized data stored in the various tables WP uses to store different types of content.

  4. Are you using a 3rd Party theme for your site? Many of them use absolute vs. relative urls for embedding links to CSS & JS files or even just as base URL settings, any of which may hamper your ability to get all assets to use https. You should audit your theme's PHP files to check what methods they use to generate base URLs and also how they embed links to resources like CSS files or JS includes. Elegant Themes, one of the more popular WP Theme developers, offered this guide, which recommends using either custom code or a plugin.

  5. Are you using any 3rd Party Plugins that may affect Media Assets, Posts, or other pages in use by WordPress? WooCommerce comes to mind since it has specific settings for how it handles http vs. https that may override the site-wide settings you set in part 1 above. This discussion on StackOverflow has some good info on this topic.

  6. Are you using a Reverse Proxy / SSL offloading / Load Balancer / CDN service like Amazon Web Services ELB or CloudFlare? If you are, the settings that they has for SSL will affect how they serve your content to end users. CloudFlare has a specific set of instructions on how to use their flexible SSL configuration, and some users report having to add a a little bit of custom code to get the expected behavior when hosting behind load balancers. The official documentation also provides a guide on addressing this issue, regardless of which vendor you are using, though you may need to edit some code or modify a directive in your apache vhost file to enable HTTPS protocol forwarding to function properly.

Note - Most people suggest using a 3rd Party Plugin to handle all of the above for you without much troubleshooting or programming required, though I've never used any myself so can't directly recommend one vs. another. WordPress HTTPS appears to be a popular one, and there's an easy-to-follow guide on how to leverage it's features that you may find handy. It hasn't been updated for a while, though, so I'm not sure I'd recommend it unless you can't get any others to work.

Also, the plugin you choose may depend on who's hosting your site (here's one from HostGator with instructions on setup and troubleshooting) and wether or now you're using any systems like CLoudFlare or Load Balancers in your setup. Here's a list of the ones I found on the Codex.

You may also find this WP Beginners blog post a helpful resource to introduce the key concepts of using SSL on WordPress sites with a lot of great diagrams and supporting references for you to explore to develop a good understanding of why it is a little complicated to get working correctly.

Let us know which options worked best for you!

0

Thanks for your excellent answer, I had already setup above methods and my website redirect working on web browser but google search engine not indexing posts with https but only pages indexing with https, I had already submitted my web site domain with https in google webmaster tools. Please check in image why my site redirecting in 3 versions from 1st http://whatsappstatustxtdotcom to https:// to https://www,

enter image description here

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.