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 https redirects in the web-config it causes even more problems. I've exhausted google so any advice appreciated.

  • define('FORCE_SSL_ADMIN', true); Jul 21, 2016 at 9:30
  • hi, yes that's already in my wp-config file - the issue I think is having to use web.config rather than htaccess Jul 21, 2016 at 9:57

2 Answers 2


for anyone interested the hosting company is going to convert wp install to linux so that should sort things.

found this plugin https://wordpress.org/plugins/really-simple-ssl/ which could be good for anyone having issues on linux.


Put this in your web.config:


<rule name="HTTP to HTTPS redirect" stopProcessing="true">
                    <match url="(.*)" />
                        <add input="{HTTPS}" pattern="off" ignoreCase="true" />
                    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}"
                        redirectType="Permanent" />
                <rule name="Add Strict-Transport-Security when HTTPS" enabled="true">
                    <match serverVariable="RESPONSE_Strict_Transport_Security"
                        pattern=".*" />
                        <add input="{HTTPS}" pattern="on" ignoreCase="true" />
                    <action type="Rewrite" value="max-age=31536000" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.