PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, July 14, 2022

[FIXED] Why did my word-press site is showing not secure

 July 14, 2022     security, ssl, web-deployment, wordpress, wp-admin     No comments   

Issue

I have a new website but it has some SSL issue. Issue is that when i type my website URL without https like only (example.com) in address bar it becomes not secure and when i type https with it like (https://example.com) my site show secure.

I have installed the SSL certificate with my cPanel "Let Encrypt SSL" option. And i have update my urls from http to https in my worpress Settings > General.

Help me with this I want to type my url in address bar without https (example.com) like othere website we usually surf on internet and want it to automatically detect that it is a secure website.


Solution

I'm assuming you've already acquired an SSL certificate for your site.

What you want to do is redirect HTTP to HTTPS via your .htaccess file. A quick search will tell you how to do that, it is something like:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.example/$1 [R,L]

Another easy solution is to redirect via your Apache configuration. Navigate to /etc/apache2/sites-available/ and edit your site's config file. Add the following lines:

<VirtualHost *:80>
    ServerName yourdomain.com
    Redirect permanent / https://yourdomain.example/
</VirtualHost>


Answered By - Amr H
Answer Checked By - Marie Seifert (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing