# Support aliases (e.g. www) for site tenants

**Project:** Sites | **Votes:** 1
**URL:** https://roadmap.ploi.io/projects/2-site-level-requests/items/1678-support-aliases-eg-www-for-site-tenants

---

### Problem
When adding a tenant to a site, Ploi generates an NGINX server block with only the exact tenant hostname in server_name (e.g. example.nl). There is no way to add aliases to a tenant, so www.example.nl doesn't match any server block and falls through to the server's default vhost.

#### This causes two issues:

Requesting an SSL certificate for a tenant including its www variant fails. Let's Encrypt's HTTP-01 challenge for www.example.nl hits the default vhost and returns 404, so the whole certificate request fails, even though the apex validates fine.
Visitors on www.example.nl are served the wrong site (the server's default vhost) instead of the tenant's application.

The only workarounds right now are adding the www hostname as a separate tenant (which doubles the tenants and certificates per domain), or manually editing the tenant config, which Ploi overwrites on the next regeneration.

### Proposed solution

Allow aliases per tenant, the same way they already exist for sites, and add them to the tenant's server_name.
When adding a tenant, offer a checkbox: "Also add www.{tenant}" (enabled by default).
When requesting a tenant certificate, include the tenant's aliases in the domain list, with the option to deselect them.

#### Related
Tenant port-80 blocks live in the same before/ folder as the site's ssl-redirect.conf. Since NGINX loads these files alphabetically, whether a tenant's ACME challenge works depends on whether its filename sorts before or after ssl-redirect.conf. Adding an /.well-known/acme-challenge/ exception to the generated redirect block would make tenant certificate requests reliable regardless of naming.

#### Use case
We host sites for customers who own multiple country domains (.com, .nl, .eu, .pt) pointing to the same application. Each of these domains needs to work with and without www, with valid certificates.

![](https://roadmap.ploi.io/storage/kHUqsjyeKULbYSiFwXWOKGbTuCKy0xyuXGmuL0MT.png)

