Share via


How to configure IIS HTTP Redirection in order to access Office 365 Resources via Custom Domain

1. In server Manager under Add roles and features select Web server (IIS). Make sure that under common HTTPS features you have selected HTTP Redirection

 

2. Open IIS Manager

3. Create a new Website. As a hostname type in the external subdomain you want to use. Note: you can use any subdomain like owa.contoso.com; mail.contoso.com, intanet.contoso.com etc. as long as those are not in use.

 

4. Select the new site we have created and double click on HTTP redirect

  

5. Select “Redirect the requests to this destination” and type:

For OWA: https://outlook.office365.com/owa/yourAcceptedDomain.com

For SharePoint Team Site: https://yoursite.sharepoint.com

For Portal Login: https://login.microsoftonline.com/

  

You can use the same webserver for multiple redirects. However, make sure that the physical path you specify when creating the site is different for each one.

6. Create an A record in your DNS server for your domain to point to your IIS server

(owaOnline.contoso.com IN A <internal IP of IIS server> or Intranet.contoso.com IN A <IP of IIS server>)

a. Start DNS Configuration Manager on your DNS server

(Administrative Tools\DNS)

b. Under Forward Lookup zones find your root domain (YourAcceptedDomain.com). If it is not present you can create a new Forward Lookup Zone. In this case be sure to add all of your Public DNS records as well

c. Add the needed A records (Right click\New Host (A or AAA)) and 

  

7. Run iisreset in an elevated cmd window

8. If you want to enable the same functionality for internet users, your IIS server must be published and you must edit your public DNS (subdomain.contoso.com IN A <Public IP of IIS Server>)

Note: HTTP Redirect can be enabled on any web server that supports that functionality.