If the default store is example.com and the second store is sub.example.com. Both the stores have SSL. The second store is a clone of the default store. The second store home's all the links point to the default store where correct layout works with just http but not https. If I try any internal page link manually, it is working with https where http is showing not found error.

In the admin dashboard: settings -> Stores -> second store - >General
Store URL : https://sub.example.com/
settings -> Stores -> second store - >Server SSL is set to YES
My OC version is 2.3.0.2 Also, I want to force http to https. Any help would be appreciated.