DbAppWeb.com

Menu
  • Home
  • Linux
  • HP-UX
  • macOS
  • Windows
  • Web Servers
  • App Servers
  • Storage

Force SSL On All Pages in WordPress on Bluehost

August 31, 2020 DbAppWeb Admin

Problem

I have made the required setting under WordPress settings for my WordPress blog www.dbappweb.com to run all the pages on SSL. I made the below settings on WordPress under Settings >> General, changing the URLs from http://www.dbappweb.com to https://www.dbappweb.com.01 Force SSL On All Pages in WordPress on Bluehost

But still, if someone tries to access the webpages without SSL then these were being accessed. I was in search of a solution which can redirect all HTTP requests to HTTPS. Finally, I found the solution and implemented it on my WordPress blog hosted on Bluehost to force SSL on all pages.

Solution

To force all the pages to use SSL i.e. forcefully redirecting all the pages from HTTP to HTTPS you need to modify the .htaccess file on Bluehost. You need to add the below lines of code in the .htaccess file.

RewriteEngine On 
RewriteCond %{HTTPS} off 
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Edit .htaccess file on Bluehost

  • Login to Bluehost and open the cPanel02 Force SSL On All Pages in WordPress on Bluehost
  • Under the File section click on the File Manager icon.03 Force SSL On All Pages in WordPress on Bluehost
  • A pop-up File Manager Settings will be opened, select the Web Root from Directory Section and check the checkbox against Show Hidden Files under Preferences.04 Force SSL On All Pages in WordPress on Bluehost
  • I will open the public_html directory of your webroot, try to find the .htaccess file in this directory. Here I was not able to find the .htaccess file because hidden files were not being shown here even after enabling the show hidden files.05 Force SSL On All Pages in WordPress on Bluehost
  • To show hidden files I have added &showhidden=1 at the end of the URL in the address bar of the browser and hit the enter button. After these hidden files are shown in the folder which can be edited.06 Force SSL On All Pages in WordPress on Bluehost
  • Select the .htaccess file and open it in Code Editor.
  • Add the lines of code as given above in the starting and save the .htaccess file.
    # Use PHP7.2 as default
    
    AddHandler application/x-httpd-ea-php72 .php
    
    .
    .
    
    #Added to force all pages on SSL 
    RewriteEngine On 
    RewriteCond %{HTTPS} off 
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    
    .
    .
    RewriteRule ^([0-9]{4})_([0-9]{1,2})_([0-9]{1,2})_archive.html$ $1/$2/ [L,R=301]
  • Now all pages of your website will be forcefully redirected to HHTPS and your website will run fully on SSL.

Last Updated: August 30, 2020

Related Posts

  • How to Update PHP version on Bluehost
  • How to Disable Trackbacks and Pingbacks in WordPress

 

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Telegram (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
Prev Article
Next Article
Tags:BlueHost SSL WordPress

Leave a Reply Cancel Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Popular
  • Recent

Categories

  • Android (2)
  • Blogger (16)
  • Domain and Hosting (1)
  • Hardware Issues (7)
  • HP-UX (55)
  • HPE Data Protector (9)
  • IBM Lotus Notes (2)
  • IBM WebSphere Application Server (16)
  • Internet Tips & Tricks (15)
  • iOS (8)
  • JBoss/WildFly Application Server (2)
  • Linux (76)
  • macOS (15)
  • Microsoft Windows (31)
  • News and Updates (11)
  • Oracle Database (5)
  • SSL/TLS (1)
  • Storage Servers (23)
  • Tools/Softwares (1)
  • VMware ESXi (17)
  • Web Servers (14)
  • WordPress (5)

Archives

DbAppWeb.com

Solution of Database, Application and Web Server Problems

About DbAppWeb.com

One Stop Solution for Database Server, Application Server and Web Server Problems.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

DbAppWeb on Social Media

Copyright © 2025 DbAppWeb.com
Terms and Conditions   Theme by MyThemeShop.com
 

Loading Comments...