I have a web site www.example.com with IP Address a.a.a.a. I need to make my email www.example.com/email with another IP of b.b.b.b. The email server is working now as mail.example.com but i need it to be www.example.com/email The two IP Addresses are accessed from the internet.

  • 1
    Why 2 IP addresses? Totally unnecessary. In fact, more work with 0 benefit.
    – closetnoc
    Commented Oct 10, 2016 at 15:44
  • Would you consider using the URL of email.example.com? That is meant for situations like this. Commented Oct 11, 2016 at 10:37

2 Answers 2


I'm guessing b.b.b.b is your mail server and you'd like to access webmail via www.example.com/email. There are basically two options.

  1. Reverse Proxy - configure your web server (a.a.a.a) to reverse proxy www.example.com/email for mail.example.com. When someone navigates to www.example.com/email/foo it will actually be mail.example.com/foo on the backend. This is a more complicated solution as there may be complications with clients using webmail such as cookies not being scoped to the domain. Be sure to thoroughly test before implementing this method.
  2. Redirect - Redirect requests for www.example.com/email to mail.example.com. Users will see mail.example.com in the address bar and connect directly to your mail server. www.example.com/email will not appear in the address bar. This is by far the simplest solution to implement and support.

UPDATE: added links for information about configuring IIS as a reverse proxy and to serve redirects. Note that URL Rewrite can also be configured to redirect requests.

  • thank you for your kind answer .... its MS exchange server 2013 and iis8
    – toto
    Commented Oct 10, 2016 at 18:29

Since the email side is working for b.b.b.b I will explain a.a.a.a.

You want to go to your domains dns settings and under MX > create a Cname record and point the alias to example.com/mail

  • 1
    -1 You don't create CNAME MX records for an address like example.com/mail Commented Oct 10, 2016 at 17:29

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.