1## domains.txt 2 3dehydrated uses the file `domains.txt` as configuration for which certificates 4should be requested. 5 6The file should have the following format: 7 8```text 9example.org 10example.com www.example.com 11example.net www.example.net wiki.example.net 12``` 13 14This states that there are the following certificates: 15 * `example.org` without any *alternative names* 16 * `example.com` with an *alternative name* of `www.example.com` 17 * `example.net` with the *alternative names*: `www.example.net` and 18 `wiki.example.net` 19 20### Aliases 21 22You can define an *alias* for your certificate which will (instead of the 23primary domain) be used as the directory name under your `CERTDIR` and for a 24per-certificate lookup. This is done using the `>` character. This allows 25multiple certificates with identical sets of domains but different 26configuration to exist. 27 28Here is an example of using an *alias* called `certalias` for creating the 29certificate for `example.net` with *alternative names* `www.example.net` and 30`wiki.example.net`. The certificate will be stored in the directory `certalias` 31under your `CERTDIR`. 32 33```text 34example.net www.example.net wiki.example.net > certalias 35``` 36 37### Wildcards 38 39Support for wildcards was added by the ACME v2 protocol. 40 41Certificates with a wildcard domain as the first (or only) name require an 42*alias* to be set. *Aliases* can't start with `*.`. 43 44For example to create the wildcard for `*.service.example.com` your 45`domains.txt` could use the *alias* method like this: 46 47```text 48*.service.example.com > star_service_example_com 49``` 50 51This creates a wildcard certificate for only `*.service.example.com` and will 52store it in the directory `star_service_example_com` under your `CERTDIR`. As a 53note this certificate will **NOT** be valid for `service.example.com` but only 54for `*.service.example.com`. So it would, for example, be valid for 55`foo.service.example.com`. 56 57 58Another way to create it is using *alternative names*. For example your 59`domains.txt` could do this: 60 61```text 62service.example.com *.service.example.com 63eggs.example.com *.ham.example.com 64``` 65 66This creates two certificates one for `service.example.com` with an 67*alternative name* of `*.service.example.com` and a second certificate for 68`eggs.example.com` with an *alternative name* of `*.ham.example.com`. 69 70**Note:** The first certificate is valid for both `service.example.com` and for 71`*.service.example.com` which can be a useful way to create wildcard 72certificates. 73