Forum Moderators: open

Message Too Old, No Replies

redirecting https non www to https://www

I have a problem above my knowledge

         

bwnbwn

4:39 pm on Jul 1, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I purchased a UCC multi domain ssl in other words I can add 15 websites under the same ssl. dominipurchasedthesslunder .com

In my webconfig file I am trying to redirect all request to https: // www . example. com I have in IIS set up the http non www to redirect to the https :// www. version of the website.

I have in my webconfig file

<rule name="HTTP Redirect to HTTPS" enabled="true" stopProcessing="true">
<match url="(.*)" ignoreCase="false" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" />
</rule>

<rule name="Redirects to www. example. com" patternSyntax="ECMAScript" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^example.com$" />
</conditions>
<action type="Redirect" url="https: // www. example .com/{R:0}" />
</rule>
I can test anything and I am redirected correctly except. https :// mydomain. com/

So I did a header check to see the trace route. The blow is what I got.
URI Valet Report for https :// domain I am checking .com/

Requested: 2015/07/01 08:57:42 User Agent: Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko

URI Valet Report for https :// domain I am checking .com/

Requested: 2015/07/01 08:57:42 User Agent: Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko

Server Headers Details
1. REQUESTING: https :// domain I am checking. com/
GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language: en-us,en;q=0.5
User-Agent: Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko
Host: domain I am checking. comConnection: Keep-Alive
SERVER RESPONSE: 301 Moved PermanentlyContent-Type: text/html; charset="UTF-8"

Location: https :// domain I purchased the ssl under .com I am being redirected to the domain I purchased the SSL under

Server: Microsoft-IIS/7.5X-Powered-By: ASP.NET
Date: Wed, 01 Jul 2015 15:57:48 GMTContent-Length: 145

Redirecting to https:// domain I purchased the ssl under com ...

2. REQUESTING: https:// domain I purchased the ssl under. com
GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzipAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language: en-us,en;q=0.5
User-Agent: Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko
Host: domain I purchased the ssl under. com
Connection: Keep-AliveSERVER RESPONSE: 200 OK
Content-Type: text/html; charset="UTF-8"Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
X-Powered-By: PHP/5.4.24
Set-Cookie: responsivestatus=on
X-Pingback: https :// domain I purchased the ssl under. com/xmlrpc.php
Link: <https :// domainipurchasedthesslunder. com/>; rel=shortlink
X-Powered-By: ASP.NETDate: Wed, 01 Jul 2015 15:57:50 GMT
Content-Length: 13001
Destination URI: https: // domain I purchased the ssl under. com

The computer screen shows

The security certificate presented by this website was issued for a different website's address

Security certificate problems may indicate an attempt to fool you or intercept any data you send to the server

We recommend that you close this webpage and do not continue to this website.

And a link under continue at your own risk.

When I click the link it takes me to the domain I purchased the ssl under just like the header check shows above.

I am lost on how to fix this any advise would be greatly appreciated

What is happening for some reason when I try to access the domain https: // domain .com the website is redirected to the domain I purchased the SSL under. I am lost on this one.
Thanks

Ocean10000

10:18 pm on Jul 1, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If this is the misktake I think it is. When you created the request for a wild card cert, the Friendly name was set to "www.example.com" not "*.example.com", which caused the problem.

Open the MMC Snap-In for Certificates. Right-click on the certificate and change the Friendly name to *.example.com. Save the changes and close out the MMC. And retry your browser by going to https://example.com and see if the warning still comes up or not.

bwnbwn

11:02 am on Jul 2, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Ocean1000 it is a UCC or multidomain certificate I added 11 different domains under it. Adding the non www version is considered a domain, I spent all day researching and testing different redirects and finally came to the conclusion I will have to add the others under the UCC. The request hits the 80 port certificate kicks in redirected. There is nothing I can do but add them to the certificate and have them mapped on the same IP to a different port on the server so the request hits a secure port and I can redirect.
1st time for me using a UCC and having limited knowledge on SSL's site wide (I always had them under a sub for a cart) I learned something today. Reason I moved to site SSL is we moved to a wordpress and take site wide data from a user if they want to request a demo of our product.

bwnbwn

6:14 pm on Jul 7, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Ocean10000 your way mo smarter than me and am stuck. Let me explain and you see if this can be done.

I am on a windows IIS7 cloud server that the host mapped threw the firewall using internal ip addresses to a specified port.

The mapping for the www version is 10.10.10.10 8080 (non secure port) (8081 secure port).

In the www bindings I have http and https mapped like this. 13.23.23.23 8080 (non secure port) (8081 secure port).
The server internal ip is 13.23.23.23
In DNS I use the internal host ip assigned to the mapping 10.10.10.10

Due to the issue I opened the thread about I added the non www version to the UCC certificate and added it to the serve so both www and non www are under a SSL certificate.

I then asked tech support to map the non www under the same IP as the www but assign the non www a different port number. This way I can add the https binding under the non www and redirect.

The tech said to do it this way.
In the bindings of the non www version he added this.
http host name domain .com port 80 using the IP address for internet traffic
http host name www. domain .com port 8081 the IP address for internet traffic (This port is the SSL port mapped for the www)
http host name domain .com port 8081 IP address for internet traffic (This port is the SSL port mapped for the www)

He told me to change the DNS on the non www version to the internal IP address mapped for the www 10.10.10.10

Now the non www version is not being redirected as above but the whole website is now showing under the non www version for https.

I told the tech guy OK you fixed one issue but how do I redirect the non www HTTPS. I have set up in IIS on the non www version to redirect to the www https version. I can redirect the www and http non www fine but not https domain .com

He told me I needed to create a rule to do this redirect. I have spent the day trying to do this both on the non www and www domain versions.

Tell me if I am wrong. To be able to redirect the https domain .com I need https set up in the bindings for the non www because the server never hits the rule due to the HTTPS being called 1st, and since I can't add the non www to a https bindings I can't get a rule to work.

This is what I asked for them to do map the non www https under the same IP the www is under but to a different SSL port. I can then add to the non www https bindings then redirect.

Am I correct or do you have a clue to a rule I could try and under what version of the domain would this rule go? I have tried both with all kinds of different rules but nothing works.

bwnbwn

12:39 pm on Jul 8, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Forget the above post I called a senior tech early this AM and he said did you set the bindings up like this and I said no your tech guy did, he said the way it was set up it won't ever redirect, I said Oh really tell me something I already didn't know.

This host is fighting tooth and nail not to issue another IP address so I said map the non www under the same IP and open another port, he said well the domain will be domain. com:444 I said I really don't care it is a dummy domain. I can set the https bindings and redirect.

Why make a simple task into a major deal just do it as I asked and I can get out of your schedule and you can move on to more important issues.

bwnbwn

3:23 pm on Jul 8, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Learned something today on UUC certificates.
I am posting this so if someone on a cloud server finds the same issue here is the fix.
I am not sure if this will work on a regular certificate, that will need to be investigated on your part. I am posting my fix in my situation.
In a UCC certificate you can add in the certificate area a * before the common name. I am not sure what this does but will research and find out.
Once the tech added that the * before the common name of the certificate.
1-He went into the bindings of the non www version
2-Added https selected the server internal IP address selected the certificate and assigned the port the www is assigned
3-changed the bindings from port 80 to the assigned non secure port assigned to the www
4-I then changed the DNS to the IP of the www mapped through the firewall

Done

bwnbwn

10:25 pm on Jul 8, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Many of you already know the * is a wildcard I knew that but I had no idea I could add it to a UCC certificate.

Interesting.