# Help with multi domains

**URL:** <https://discourse.mailinabox.email/t/help-with-multi-domains/3983>\
**Category:** Help with Setup/Upgrade\
**Created:** [November 10, 2018, 7:25pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983 "2018-11-10T19:25:21Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![dimiond](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/d/ccd318/32.png) [@dimiond](https://discourse.mailinabox.email/u/dimiond)\
**Post date:** [November 10, 2018, 7:25pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/1 "2018-11-10T19:25:22Z")

</div>

i have a vps that is running my miab with all the trimmings and it is running good and has for a few months now

i own many domains [altbash.com](http://altbash.com),.net,.tech,.pw and would like for all of the mail for those domain to go to my miab which is running on .net domain and useing the dns system built in the miab system  
i am useing .com domain to host my web site and own-cloud setup, which is on a second vps.

so i have looked at the listings that i have found here about multi domain setups but no one has ever said realy how to set them up.

So i am asking how to make this work and to teach me a little more about mail in a box

---

<div class="post-metadata">

**Author:** ![just4t](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/just4t/32/1838_2.png) [@just4t](https://discourse.mailinabox.email/u/just4t)\
**Post date:** [November 10, 2018, 8:13pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/2 "2018-11-10T20:13:43Z")

</div>

Setup an A record in “Custom DNS” for your website (sub)domain.tld poiting to your other webserver IP address.

---

<div class="post-metadata">

**Author:** ![dimiond](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/d/ccd318/32.png) [@dimiond](https://discourse.mailinabox.email/u/dimiond)\
**Post date:** [November 10, 2018, 8:33pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/3 "2018-11-10T20:33:49Z")

</div>

i can do that but how to i tell dns to send all the mail for all those domains to the miab

---

<div class="post-metadata">

**Author:** ![dimiond](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/d/ccd318/32.png) [@dimiond](https://discourse.mailinabox.email/u/dimiond)\
**Post date:** [November 10, 2018, 8:36pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/4 "2018-11-10T20:36:24Z")

</div>

and that domain is not in the drop down box

---

<div class="post-metadata">

**Author:** ![just4t](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/just4t/32/1838_2.png) [@just4t](https://discourse.mailinabox.email/u/just4t)\
**Post date:** [November 10, 2018, 9:02pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/5 "2018-11-10T21:02:21Z")

</div>

1. Create your website domain in your MiaB by adding its fist email address then, your MiaB will create all your needed ‘Standard’ DNS entries automatically.
2. Point your website domain to your MiaB NS(s) (aka ns1.box.yourboxdomain.tld and ns2.box.yourboxdomain.tld) at your registrar.
3. Add a custom DNS A record entry for your domail.tld domain pointing to your webserver IP address.
4. Add a custom DNS entry for your www.domail.tld (sub)domain domain pointing to your webserver IP address.

Notes:

- That’s ONLY if you want to manage all your domains DNS(s) through your MiaB server.
- DNS changes may need up to 48h to propagate worldwide.

---

<div class="post-metadata">

**Author:** ![dimiond](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/d/ccd318/32.png) [@dimiond](https://discourse.mailinabox.email/u/dimiond)\
**Post date:** [November 10, 2018, 9:06pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/6 "2018-11-10T21:06:59Z")

</div>

i can’t just send the mail to the mail server i have to redo all dns stuff

for example – [www.altbash.com](http://www.altbash.com) is the site but [user@altbash.com](mailto:user@altbash.com) to the mail server

---

<div class="post-metadata">

**Author:** ![just4t](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/just4t/32/1838_2.png) [@just4t](https://discourse.mailinabox.email/u/just4t)\
**Post date:** [November 10, 2018, 9:14pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/7 "2018-11-10T21:14:26Z")

</div>

Then, as said, add custom **A** record for **[www.altbash.com](http://www.altbash.com)** pointing (value) to your webserver **IP** Address.

---

<div class="post-metadata">

**Author:** ![alento](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/alento/32/1371_2.png) [@alento](https://discourse.mailinabox.email/u/alento)\
**Post date:** [November 11, 2018, 12:38am UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/8 "2018-11-11T00:38:36Z")

</div>

> [@just4t](#):
>
> 1. Point your website domain to your MiaB NS(s) (aka ns1.box.yourboxdomain.tld and ns2.box.yourboxdomain.tld) at your registrar.

For clarity this should state:  
2. Point your name servers to your MiaB NS(s) , at your registrar. (For each domain)  
(aka ns1.box.yourboxdomain.tld and ns2.box.yourboxdomain.tld)

---

<div class="post-metadata">

**Author:** ![dimiond](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/d/ccd318/32.png) [@dimiond](https://discourse.mailinabox.email/u/dimiond)\
**Post date:** [November 11, 2018, 6:06pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/9 "2018-11-11T18:06:59Z")

</div>

if that is the case then how would you deal with [cloud.altbash.com](http://cloud.altbash.com)

---

<div class="post-metadata">

**Author:** ![just4t](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/just4t/32/1838_2.png) [@just4t](https://discourse.mailinabox.email/u/just4t)\
**Post date:** [November 11, 2018, 7:30pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/10 "2018-11-11T19:30:04Z")

</div>

If **cloud.altbash.tld** runs in your other WEB server, too then add a custom **A** record for **cloud@bash.tld** pointing (value) to your webserver **IP** Address.

---

<div class="post-metadata">

**Author:** ![dimiond](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/d/ccd318/32.png) [@dimiond](https://discourse.mailinabox.email/u/dimiond)\
**Post date:** [November 11, 2018, 7:42pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/11 "2018-11-11T19:42:49Z")

</div>

why do i get this error with the a record

| ? | Web has been disabled for this domain because you have set a custom DNS record. |
| --- | --- |
| ? | A redirect from ‘[www.altbash.com](http://www.altbash.com)’ has been disabled for this domain because you have set a custom DNS record on the www subdomain. |

sorry for all the questions but want to get this right to move on to add to my web site upgrades

---

<div class="post-metadata">

**Author:** ![dimiond](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/d/ccd318/32.png) [@dimiond](https://discourse.mailinabox.email/u/dimiond)\
**Post date:** [November 11, 2018, 9:58pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/12 "2018-11-11T21:58:06Z")

</div>

and when i try to make [mail.altbash.net](http://mail.altbash.net) which is a sub of [box.altbash.net](http://box.altbash.net)  
in the pannel to make that it would be ip/mail right

---

<div class="post-metadata">

**Author:** ![alento](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/alento/32/1371_2.png) [@alento](https://discourse.mailinabox.email/u/alento)\
**Post date:** [November 11, 2018, 10:05pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/13 "2018-11-11T22:05:46Z")

</div>

> [@dimiond](#):
>
> why do i get this error with the a record

Because MiaB is expecting the A record to point to this box, but it is not. You can safely ignore this error and also the errors that will be shown in the status page.

---

<div class="post-metadata">

**Author:** ![dimiond](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/d/ccd318/32.png) [@dimiond](https://discourse.mailinabox.email/u/dimiond)\
**Post date:** [November 11, 2018, 10:07pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/14 "2018-11-11T22:07:50Z")

</div>

ok now the issue with the sub domains i want [mail.altbash.net](http://mail.altbash.net) to land on [box.altbash.net/mail](http://box.altbash.net/mail)

---

<div class="post-metadata">

**Author:** ![alento](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/alento/32/1371_2.png) [@alento](https://discourse.mailinabox.email/u/alento)\
**Post date:** [November 11, 2018, 10:09pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/15 "2018-11-11T22:09:50Z")

</div>

You’ll have to access it as [https://mail.altbash.net/mail](https://mail.altbash.net/mail)

There are some unsupported modifications to do what you want I believe … search the forum.

Personally, I just use the URL as above … of course /admin works too.

---

<div class="post-metadata">

**Author:** ![dimiond](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/d/ccd318/32.png) [@dimiond](https://discourse.mailinabox.email/u/dimiond)\
**Post date:** [November 11, 2018, 10:12pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/16 "2018-11-11T22:12:40Z")

</div>

so you are saying that if in but in [mail.altbash.net](http://mail.altbash.net) i can not make it reroute to [box.altbash.net/mail](http://box.altbash.net/mail) automatically

---

<div class="post-metadata">

**Author:** ![alento](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/alento/32/1371_2.png) [@alento](https://discourse.mailinabox.email/u/alento)\
**Post date:** [November 11, 2018, 10:16pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/17 "2018-11-11T22:16:39Z")

</div>

Maybe this will help … and there are other methods if you search this forum carefully. Most are unsupported modifications as they will be overwritten when MiaB is updated.

> [@DNS /Rewrite? - Customizing the webmail urls for multiple domains on a single box?](https://discourse.mailinabox.email/t/dns-rewrite-customizing-the-webmail-urls-for-multiple-domains-on-a-single-box/2436):
>
> I have multiple domains on a single box. Is there a way that I can create unique urls for accessing Roundcube? eg [webmail.domain1.com](http://webmail.domain1.com) -\> [box1.domaina.com/webmail](http://box1.domaina.com/webmail)[webmail.domain2.com](http://webmail.domain2.com) -\> [box1.domaina.com/webmail](http://box1.domaina.com/webmail) Can i create an Apache rewrite rule to accomplish this? Other thoughts?

---

<div class="post-metadata">

**Author:** ![alento](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/alento/32/1371_2.png) [@alento](https://discourse.mailinabox.email/u/alento)\
**Post date:** [November 11, 2018, 10:20pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/18 "2018-11-11T22:20:41Z")

</div>

This one may be better …

> [@Access Mailbox From A Subdomain](https://discourse.mailinabox.email/t/access-mailbox-from-a-subdomain/696):
>
> I am not sure if this is possible. But I think that would be great, if I can access my mailbox by typing: mail.domain.com which leads to box.domain.com/mail Especially for my familiy would that be a great feature, they are all not that techie and I want it to be as easy as possible for them to acces their email accounts. Actually that should just be some lines in the nginx config isn’t it? Cause as far as I know, that redirect is not doable with DNS. Am I wrong?

---

<div class="post-metadata">

**Author:** ![system](https://discourse.mailinabox.email/uploads/default/original/2X/4/4d0933d13c456b7e57f296aa6cc344525b6f0c70.png) [@system](https://discourse.mailinabox.email/u/system)\
**Post date:** [November 18, 2018, 10:20pm UTC](https://discourse.mailinabox.email/t/help-with-multi-domains/3983/19 "2018-11-18T22:20:47Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
