0

My marketing team accidentally created materials with an additional 'www' sub domain and I need to see if I can remove it using Azure traffic manager.

Marketing domain (incorrect) HTTPS://www.my.site.com

Desired domain HTTPS://my.site.com

I only have a wildcard cert for *.site.com so at this time I cannot support the 'www'.

If the user enters the 'www' site over HTTP I can successfully redirect to the correct site. If they enter the HTTPS, or use Firefox that defaults to HTTPS, they will see a certificate error for HTTPS://www.my.site.com.

Would a second wildcart cert for *.my.site.com help? I am not sure where I would configure it.

Any help would be appreciated, thanks.

ghawkes
  • 553
  • 1
  • 5
  • 14

1 Answers1

1

The certificate you have should be enough since its a wildcard cert, no need to buy another one.

I think this can be fixed by adding another host-name to your app and creating another SSL binding.

That means you need to add the www.my.site.com host-name (make sure to assign it to the traffic manager url):

Hostname

And then do the binding:

Binding

Once that is done both URLs will work through SSL.

If you want to then have all traffic from going to you can then add a URL re-write rule:

<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="SPA">
                    <match url="OLDURL" />
                    <action type="Rewrite" url="NEWURL" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

You can look at this other answer to get more data: Rewriting a URL in an Azure web app

Byron Tardif
  • 1,172
  • 6
  • 16
  • Thanks for the reply Byron. We tried a solution like this and it got us most of the way. We still see errors when the user types HTTPS://www.my.site.com. This always happens in the newer versions of Firefox since they use the HTTPS prefix by default when the user enters a URL. My cert cannot bind to \*.\*.site.com so that is why I was looking into a 2nd cert. Have you seen this situation before? – ghawkes Oct 04 '17 at 22:46
  • the above code look fine but when I edit my web.config file and past rewrite code and save the file and again on refresh pasted code disappeared? any logic, site is connected with Azure pipeline – Saad Awan Sep 28 '20 at 12:18