Force non-www on main domain AND force SSL on main domain + subdomain

Avatar
  • Answered
I'm using htaccess trying to get our main domain (example.com) to force the non-www version as well as force ssl (https) and on our subdomain (secure.example.com) force https as well. This issue seems to be that while I can get the main domain working, the subdomain forces ssl but is showing the content of the main domain?! If I comment out all the htaccess in the subdomain (secure.example.com), the URL redirects to something like: http://maindomain.co/domains/secure.example.com/

Does anyone happen know the proper syntax for htaccess to drop into both the main domain and subdomain to get everything working correctly? Thanks!
Avatar
Scott
Hello safenow,

Thank you for your question about redirecting. I did some tests on your main domain and it is redirecting to both non-www and https at the same time.

As far as the subdomain, I took a look and got it to work by uncommenting the second set of redirect code in the .htaccess file for the subdomain folder.

If you are still having issues seeing this you may want to try another browser or open a private browser tab and try again. They are both currently working with as described (the subdomain needs to have that particular code uncommented)

Kindest Regards,
Scott M