Question

When i try to access my site using customsite.com it points to port 80 default site. when i put url as https://customsite.com it points to proper port and i could log in to the site.

When a user enter customsite.com url in the browser i want to redirect it to proper port and use https . Shown in screenshot below . How can i do this. Kindly help.

enter image description here

I have a site created on port 1000 (AAM is configured for this site set to customsite.com), i extended web application to port 443. For the application 443 i have changed the Bindings in IIS as follows:

enter image description here

Was it helpful?

Solution

An easier no code solution is to configure IIS to handle it for you. Create a new site setup with the hostheader customsite.com, and on port 80. Within the site, select HTTP Redirect under the IIS group:

enter image description here

enter image description here

From here you can redirect to https://customsite.com.

OTHER TIPS

The normal configuration for your scenario is to rely on the alternate access mappings (AAM). I'm not sure what setup your are using for your web application, but the best practice approch would be:

Using this configuration will automatically redirect from HTTP to HTTPS.

You have to watch out for some pifalls around the IIS bindings, but this is doable.

If you created the web application with the HTTP url (http://customsite.com) and then extended the web app for using SSL on the new zone (what is also a best practice) you could unextend the SSL web app and reconfigure the AAM and IIS bindings manually.

  • Unextend SSL site (so the URL is no longer visible on the AAM config page)
  • Change the URL of the default zone to the SSL version
  • Add the HTTP version as an internal url pointing to the default zone
  • Configure IIS bindings manually to add HTTP and HTTPS bidnings with the matching certificate

For further readings about AAM check the technet documentaion for SharePoint 2007 as this topic didn't change in 2010 and i don't find the url for 2010 at the moment:

http://technet.microsoft.com/en-us/library/cc287923(v=office.12).aspx

As far as is understand your AAM configuration you could to the folowing:

  • Your initial url while creating the web app has some servername and random port (1000)
  • You extended the site inside of SharePoint CA lets say on the intranet zone (zone 2)
  • Do the follwoing
    • Edit public URLs for the web app
    • Switch public URLs for both zone so the default zone holds the HTTPS url and the intranet zone now holds the server name + port url
    • Add an internal url for the HTTP link and point it to the default zone (that holds the HTTPS url)
    • Check your IIS settings to the HTTPS website (created while extending the web app) to listen on port 80 (plus host header) and 443 (with certificate)
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top