Www.example.com redirects to https://box.example.com


First of all thanks for the mail-in-a-box. Also sorry for (h)ttp and (w)ww below. I was not allowed to add more than one URL in one message. URL’s will work if you remove the brackets.

I have set up everything and everything is working fine, I am using sub domain configuration from the installation instructions, i.e. All my domain is controlled by mail-in-a-box.

My domain is sparklegal.com.au
I get ssl certificate from (h)ttps://www.startssl.com/ which says the certificate is valid for sparklegal.com.au and www.sparklegal.com.au and SSL labs confirms it (h)ttps://www.ssllabs.com/ssltest/analyze.html?d=www.sparklegal.com.au

I have also updated the Custom DNS in the box/Admin page

Domain Name Record Type Value
(w)ww.sparklegal.com.au A

if I write sparklegal.com.au on the browser it redirects to (h)ttps://sparklegal.com.au/ and everything works fine including ssl

Now I have two problems

1- if I write www.sparklegal.com.au on the browser it redirects to (h)ttps://box.sparklegal.com.au/ I want it to redirect it to (h)ttps://www.sparklegal.com.au/
2- If I write (h)ttps://www.sparklegal.com.au/ on the browser (Including the https:// in front) it goes to (h)ttps://www.sparklegal.com.au/ (does not redirect to (h)ttps://box.sparklegal.com.au/ anymore) but it gives SSL ceritication Warning and ask me to accept the self signed certificate before continuing.

I would be greatful if you can help me.

Thanks in advance

Basically the same issue I reported here? https://github.com/mail-in-a-box/mailinabox/issues/321

Would love to see a solution for this.

You’re accessing a domain that the box doesn’t know it’s supposed to be serving. If you add a mail alias @www.yourdomain.com, it’ll know to start serving that domain.

Thanks Josh it works now.

For others here are the steps i have taken

1- In the box/admin page I have selected System->Custom and removed the www.sparklegal.com.au entry
2- Then I have selected Mail->Aliases and added dummy@www.sparklegal.com.au as an allies to administrator@box.sparklegal.com.au. The system added couple of other aliases automatically. WARNING DO NOT add a new User if you accidentally added a new user then archive it in the users page at least that is what I have done :smile: .
3- Then I have opened a Private Browser window (you can also clean the cache of your browser) and write www.sparklegal.com.au on the url and everything including the SSL is working.

Norman, you might solve your problem if you follow the instructions above.