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

2 Answers 2


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.

  • This is a possible solution but you will expirience problem if IIS is not appy with content from mission .aspx 404 error and stuff like this. You coud edit mappings and stuff, but this will only reduce the amount of errors users might see. There is an out of the box feature to ensure this is working as designed using AAM. Relying on AAM will also take care of and "deep links" into SharePoint site collections or subwebs. Commented May 14, 2013 at 14:12
  • will this affect search service by any chance?
    – Ishan
    Commented May 15, 2013 at 6:54
  • Search will use whatever URL you give it. I recommend giving it the https URL since that's the final location. Commented May 15, 2013 at 12:16
  • Thanks.I am facing issue as posted here, can you please guide? social.msdn.microsoft.com/Forums/en-US/sharepointsearchprevious/…
    – Ishan
    Commented May 15, 2013 at 12:48

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:


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)

Your Answer

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

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