What is the "Force secure connections" option used for?

In the WordPress Admin (5.9) there is a "Https" Setting under the general Tab. This seems to be very new, as it is not translated to my native (german) language. Furthermore it says: HTTPS is essential to securing your WordPress site, we strongly suggest upgrading to it. More details [ ] Force secure connections The link is broken, this seems to be the new one. However there is no information about what this option is used for. Is it for …
Category: Web

Mixed content and expired session issues with SSL and wp-admin

I am developing a site that has an SSL certificate. I've activated wp-admin being conducted over https (using define('FORCE_SSL_ADMIN', true); in wp-config.php). It's created a lot of issues using wp-admin. 1) Whilst doing things in wp-admin I'll regularly get a message saying the session has expired. As far as I can tell, this mostly happens when jumping from one admin page (url) to another page (url). 2) In Chrome I'll often see a little silver shield in the address bar …
Category: Web

Migrating MultiSite to SSL: Media Library not updating

I'm trying to migrate our companies websites over to SSL. We have 6 websites in total, migrating the 5 regular websites worked without a hitch, however our Multi Site installation is causing some weird grief. To perform my migration I have installed an SSL Certificate on the server, used this plugin "Better Search Replace" to run through the database to update all urls from http:// to https:// site wide. On the multisite, the media library urls are still reflecting http:// …
Category: Web

How disable SSL redirect for specific URL?

I have a specific URL that has to be accessible without SSL, so that some old devices can access it. The reason is those old devices have the URL hardcoded. The URL is http://domain.com/server My .htaccess looks like this: RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> Redirect 301 /server http://sub.domain.com/server However, the devices can't even access the first URL because it keeps redirecting to https://domain.com/server
Category: Web

Using the JSON API via HTTPS and HTTP

We have developed a mobile application using the JSON API plugin. The current website is running on HTTP, we are planning to change the website to HTTPS. Currently, mobile users on the live app are on HTTP; if we change the website to HTTPS then the app doesn't work so we have to publish a new app to work on HTTPS, but then the old app will not work, and we can't force a user to upgrade the app to …
Category: Web

How do I secure a subdomain using UCC SSL?

I have a UCC SSL Certificate installed on my primary domain (example.com). I have 3 subdomains listed as Subject Alternative Names (SANs) (shop.example.com, distributors.example.com and careers.example.com). Currently, I'm working on the shop subdomain. I installed the Wordpress HTTPS (SSL) plugin, but when I try to go to say, (link 1) https://shop.example.com, it redirects to (link 2) https://example.com. I cannot for the life of me figure it out. I tried changing the WordPress Address (URL) and Site Address (URL) in General …
Category: Web

Switching MultiSite installation from HTTP to HTTPS

I installed MultiSite with the URL set as http://example.com, but now I want to force all requests to go over HTTPS, so I'm trying to change the URL to be https://example.com. I've gone through the database and updated all the siteurl and home values to have https, but the site still loads over HTTP, instead of being redirected to HTTPS. I know that I could setup some htaccess rules, but that's prone to errors. In regular installations WordPress will automatically …
Category: Web

https - too many redirects

I have recently enabled SSL certificate and I'm tring to use it in my wordpress site. My website's url is All plugings are disabled. I replaced define('WP_HOME','http://mywebsite.com'); define('WP_SITEURL','http://mywebsite.com'); with: define('WP_HOME','https://mywebsite.com'); define('WP_SITEURL','https://mywebsite.com'); Here's what I get in http://www.redirect-checker.org: 301 Moved Permanently https://mywebsite.com/ 301 Moved Permanently https://mywebsite.com/ 301 Moved Permanently https://mywebsite.com/ 301 Moved Permanently Problems found: Too many redirects. Please try to reduce your number of redirects for https://mywebsite.com. Actually you use 19 Redirects. Ideally you should not use more than 3 …
Category: Web

I get "too many redirects" problem when migrating localhost site

So, I have a website working properly on my localhost but when I migrate it to hosted server I get too many redirects error. I've done migrations before and this never happend but this time. Difference is that the server has SSL certificate activated to my domain. Can this problem occur because I developed site on localhost with no SSL certificate and on HTTP protocol instead of HTTPS? How can I fix this or what is the proper way for …
Category: Web

How to force the admin-ajax.php file to load over HTTPS?

I have a site that I've recently put 100% behind HTTPS. All assets on the front end and the back end are successfully being called over HTTPS, except admin-ajax.php. This is causing any functionality that depends on the file to fail, including but not limited to CF7, Elementor and other Forms that use AJAX submission, etc. The error I get, which you can see in the screenshot is "Mixed Content: The page at 'https://toursoft.co/contact-us/' was loaded over HTTPS, but requested …
Category: Web

Mixed Content warnings google fonts

I installed a ssl certificate to my blog and moved everything from http to https. But I still get duplicate content warnings that the google fonts are loaded via http. I can't seem to find where I can change this. I am using the theme SmartAdapt. Can anyone give me a tip, where i can change these font includes to https? Thank you very much, Michael
Category: Web

Change header image loaded by jQuery to use HTTPS

My theme contains a parallax header image. How can I change the URL of the header image so that it uses HTTPS? I want to do it manually. Currently the URL is: http://example.com/themes/abc/header.jpg I want to change it to: https://example.com/themes/abc/header.jpg Plugins are not helping me on this specific file (they are converting others). Chrome tells me the header is being loaded by jquery.js. I have no idea how jQuery is doing this. I believe editing functions.php can help, but how …
Category: Web

WP media attachment location vs permalink

Yesterday I moved my sites from http://www.example.com to (secure site and removed the www). Now when I look at an attachment page I see the File URL as the old http://www ... but the page permalink at https://. I have even deleted the original photos and re-uploaded new ones, thinking that might solve it, but it does not. The domain is properly set (https://) in Wordpress Settings/General. The site works fine ... and the switch to https went much more …
Category: Web

wordpress http to https windows server

Having a few issues getting things to work after changing wordpress from http to https on a windows sever. The web.config file is a bit of a mare to work with and the hosting company seems to think that changing http to https in wordpress settings is the only change necessary. currently I can only get the site to load css/js files on any pages other than the homepage by using default permalinks. and when I try adding http to …
Category: Web

How to control SSL in Wordpress for automatically changing http to https?

I have a domain and one subdomain. The domain has a installed SSL with valid certificate but the subdoamin doesn't have it. I have a link from domain's wordpress header.php file that pointing main page in subdomain. The link supposed to be as HTTP but it was changed to HTTPS. I edit header.php file but after update the file it changed to HTTPS again. I installed Wordpress HTTPS plugin in domain wordpress. What I have done: The domain wordpress is …
Category: Web

bloginfo(); outputs wrong urls without https on inner pages

Template header has lines like this <link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/icons/favicon.ico"> The problem is that bloginfo('template_directory') and other functions that use site_url (get_template_uri etc.) output url with HTTP instead of HTTPS. It happens on every page excepting index page. On the main page urls are correct, with https. So inner pages are broken because of mixed content. Site home and wp home in settings are set to https://example.net. All http links in database are replaced with https links. Nothing …
Category: Web

Stop WordPress and Plugins from Overwriting .htaccess

How can I prevent WordPress and plugins from overwriting my .htaccess file? I use Wordpress to set the structure of my permalinks; so I doubt it is practical to deny all permissions to the file. If it is unlikely that WordPress is responsible for overwriting the file, advice on determining what is responsible would be helpful. I recently added these rules to .htaccess to redirect traffic to HTTPS. RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] One day later, I found …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.