works, does not! Help!


Can anyone point me in the right direction.

I have a domain that is hosted with iis7. The url rewrite module redirects all www.domain .com to and I have used the well documented rule to force the site to add https:// to the domain name.

Therefore I would expect all

should all go to

But gives a security error:

Your connection is not private
Attackers might be trying to steal your information from (for example, passwords, messages or credit cards). NET::ERR_CERT_COMMON_NAME_INVALID

My web.config is:

<?xml version="1.0" encoding="UTF-8"?>
            <remove statusCode="500" subStatusCode="19" />
            <remove statusCode="500" subStatusCode="18" />
            <remove statusCode="500" subStatusCode="17" />
            <remove statusCode="500" subStatusCode="16" />
            <remove statusCode="500" subStatusCode="15" />
            <remove statusCode="500" subStatusCode="13" />
            <remove statusCode="500" subStatusCode="100" />
            <remove statusCode="500" subStatusCode="12" />
            <remove statusCode="404" subStatusCode="-1" />
            <error statusCode="404" subStatusCode="-1" prefixLanguageFilePath="" path="/site_error.asp" responseMode="ExecuteURL" />
                    <preCondition name="ResponseIsHtml1">
                        <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
                <rule name="CanonicalHostNameRule1">
                    <match url="(.*)" />
                        <add input="{HTTP_HOST}" pattern="^domain\.co\.uk$" negate="true" />
                    <action type="Redirect" url="{R:1}" />
                <rule name="HTTP to HTTPS redirect" stopProcessing="true">
                    <match url="(.*)" />
                            <add input="{HTTPS}" pattern="off" ignoreCase="true" />
                    <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />

My bindings attached as a screen shot.

The domain is on a dedicated ip address.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
what is the exact certificate error?
it is probably the name on the certificate doesn't match
I'd use a redirect rule rather an url rewrite.
Did u create A record for www and also please check the site content and also clear the browser history..
Henrik JohanssonSystems engineerCommented:
Certificate errors are raised when certificate isn't valid. isn't the same thing as
Certificate either need to specify all names expected to be used (include both domain, co,uk and www,domain, in certificate) or be a wildcard certificate that allows *

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rwlloyd71Author Commented:
Thank you!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.