# Yunohost on Subdomain, Mail on main domain

**URL:** https://forum.yunohost.org/t/yunohost-on-subdomain-mail-on-main-domain/21935
**Category:** Advanced use case
**Tags:** mail, dns, english
**Created:** [November 2, 2022, 9:42pm UTC](https://forum.yunohost.org/t/yunohost-on-subdomain-mail-on-main-domain/21935 "2022-11-02T21:42:22Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![tomdereub](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/t/c57346/32.png) [@tomdereub](https://forum.yunohost.org/u/tomdereub)
#### Post date: [January 24, 2025, 10:29am UTC](https://forum.yunohost.org/t/yunohost-on-subdomain-mail-on-main-domain/21935/7 "2025-01-24T10:29:50Z")

</div>

So we found a workaround with @ljf :

- all apps that are accessible for visitors : no problem (in example, app1 and app4)
- for the other apps (example app2 and app3), I had to create a specific “subportal”, so my /etc/ssowat/conf.json.persistent looks like :

```auto
{
"domain_portal_urls": {
        "portal.domain.tld": "portal.domain.tld/yunohost/sso",
        "app1.domain.tld": "portal.domain.tld/yunohost/sso",
        "app2.domain.tld": "app2.domain.tld/yunohost/sso",
        "app3.domain.tld": "app3.domain.tld/yunohost/sso",
        "app4.domain.tld": "portal.domain.tld/yunohost/sso",
    },
 }

```

When you are on portal.domain.tld and clic on app2, you’ll be redirected to app2 portal. You need to login again, but then you can access the app.  
For now it seems that yunohost 12 can not handle this use case better, waiting for a real fix.

---

_[View the full topic](https://forum.yunohost.org/t/yunohost-on-subdomain-mail-on-main-domain/21935)._
