Hosting as Https only

9 months ago
I recently learned from someone that google search ranking is diminished if a site is not https. My site hosting nopcommerce is https. But one can go an http version of the site. If you just put www.[my site].com the server will respond with the non-https version and the browser will say the site is not secure.  However users can get the https version by explicitly typing https://www.[my site].com.
What I want to happen is that when a user types www.[mysite].com they will get https://www.[mysite].com.
I asked my ISP host what to do and they suggested I use a redirect.
Is this the best solution and is it the recommended practice?
How do I do that?
Thank you and I apologize if this has been asked and answered. I searched to forum for https but couldn't find the answer.
9 months ago
This is the best practice. But there is also a way to enable that from admin.
9 months ago
What version are you using ?
In v4.2 there is a setting securitysettings.forcesslforallpages which you can set to True
In v4.3 this should happen automatically
9 months ago
Brillo wrote:
I recently learned from someone that google search ranking is diminished if a site is not https. My site hosting nopcommerce is https. But one can go an http version of the site. If you just put www.[my site].com the server will respond with the non-https version and the browser will say the site is not secure.  However users can get the https version by explicitly typing https://www.[my site].com.
What I want to happen is that when a user types www.[mysite].com they will get https://www.[mysite].com.
I asked my ISP host what to do and they suggested I use a redirect.
Is this the best solution and is it the recommended practice?
How do I do that?
Thank you and I apologize if this has been asked and answered. I searched to forum for https but couldn't find the answer.


you're right. Apart from this, you should also set redirection for which domain to use either with or without www. Google considers both of them as different site. So you should redirect non www requests to www requests too.
9 months ago
Yidna wrote:
What version are you using ?
In v4.2 there is a setting securitysettings.forcesslforallpages which you can set to True
In v4.3 this should happen automatically

I'm running v4.1. I have that set to true but still I get responses for http.
9 months ago
nopAccelerate.com wrote:

you're right. Apart from this, you should also set redirection for which domain to use either with or without www. Google considers both of them as different site. So you should redirect non www requests to www requests too.


How do I set redirection?
9 months ago
The tech support from my ISP says that to get my site to always be in HTTPS that I have to have the site itself redirect to https:
"You will need to engage your web developer / programmer to set HTTP to HTTPS redirection. Hence, if someone browse site without HTTP then also it will redirect to HTTPS page."
But maybe there's something that they can do that he doesn't know about? I'm not sure what to do: try to code it or press the ISP to try and get it to work.
Is anyone in community NOT having to do custom coding to redirect to https?
9 months ago
You can set www or non www preference in nopcommerce by going to admin\Setting/GeneralCommon. Here is the setting you need to change. If SSL is enabled in store setting it should redirect. If not all you need to add redirection manually in web.config.
9 months ago
nopAccelerate.com wrote:
You can set www or non www preference in nopcommerce by going to admin\Setting/GeneralCommon. Here is the setting you need to change. If SSL is enabled in store setting it should redirect. If not all you need to add redirection manually in web.config.

I tried the setting that you suggested but it did not work. I already have the force SSL for all pages on.
Next I tried to use the web.config file to redirect to https. I found an example on the web but it broke the site. I've since removed it from the web.config and the site is still broken. I have my ISP looking into restoring it but is there an example of how to redirect to https that works for nopcommerce?
9 months ago
fyi, I had tried the example posted here:
https://www.ssl2buy.com/wiki/http-to-https-redirect-using-htaccess-or-web-config#:~:text=To%20redirect%20website%20from%20HTTP%20to%20HTTPS%2C%20you,code%20forces%20users%20to%20redirect%20to%20HTTPS%20connection

dont use it! It broke my nopcommerce site. My ISP has to restore it from a backup.