# Let's Encrypt multiple domains

**URL:** https://discourse.roots.io/t/lets-encrypt-multiple-domains/7367
**Category:** trellis
**Created:** 2016-08-08T12:07:48Z
**Posts:** 3

## Post 1 by @cclass — 2016-08-08T12:07:48Z

I have two domains (e.g. `first.example.com` and `second.example.com` setup under `site_hosts` but the SSL certificate only appears to be adding one of the domains.

I have re-provisioned the server multiple times as well as followed the instructions [here](https://discourse.roots.io/t/enabling-letsencrypt-fails/6446/6?u=cclass)

Visiting `second.example.com` shows an untrusted SSL. Upon inspection, the SSL only lists `first.example.com` instead of both domains.

I don’t receive any errors when provisioning and I see both domains in the letsencrypt tasks. Initially the server was provisioned with only one of the domains, are there any additional steps needed when adding another domain under `site_hosts`?

Thanks

---

## Post 2 by @cclass — 2016-08-08T12:17:30Z

I also followed the instructions [here](https://discourse.roots.io/t/lets-encrypt-issue-when-adding-new-domain-to-multisite/7021/9?u=cclass) with no luck, when attempting to re-provision, it fails at `letsencrypt : Generate the initial certificate` with:

`Provided agreement URL [https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf] does not match current agreement URL [https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf]`

---

## Post 3 by @cclass — 2016-08-08T12:21:49Z

Okay i’ve sorted it thanks to this PR [https://github.com/roots/trellis/pull/624](https://github.com/roots/trellis/pull/624)

Simplified:

1. If you get the `Could not access challenge file` failure: [Enabling Letsencrypt fails](https://discourse.roots.io/t/enabling-letsencrypt-fails/6446/6?u=cclass)
2. Delete the certificate and regenerate [Let's Encrypt issue when adding new domain to multisite](https://discourse.roots.io/t/lets-encrypt-issue-when-adding-new-domain-to-multisite/7021/8) (multisite or not).
3. If the above fails due to an agreement error, update per [https://github.com/roots/trellis/pull/624](https://github.com/roots/trellis/pull/624) and re-provision.
