Custom domains
A repository can be served at the root of a domain that you control, so your builds resolve from https://maven.example.com/ instead of the Artifex address.
You need admin permission in the repository.
Connect a domain
To connect a domain, follow these steps:
- Open the repository and go to Domains.
- Click New domain.
- In the Hostname field, enter the host name, such as
maven.example.com. - Click Add domain.
- At your DNS provider, add a
CNAMErecord for that host name pointing at the target that the page shows. - If the page shows a verification record, add that
TXTrecord as well. - Click Check status until the status is Active.
A host name connects to one repository. Domains under soh.gg, and the Artifex address itself, can't be used.
The records
| Record | Name | Value |
|---|---|---|
CNAME | The host name that you added | The target shown on the Domains page |
TXT | Shown on the page when ownership has to be proved | Shown next to the name |
A CNAME record can't sit at the root of a domain at most DNS providers, so use a subdomain such as maven.example.com. Some providers offer a flattened root record, which also works.
Status
| Status | What it means | What to do |
|---|---|---|
| Pending DNS | The records aren't visible yet | Check the records and wait for them to propagate |
| Pending certificate | The records are visible and the certificate is being issued | Wait, then check the status again |
| Active | The domain serves the repository | Point your builds at it |
| Failed | Verification or certificate issuance didn't succeed | Read the message on the page, correct the records, and check again |
The certificate is issued for you; there's nothing to upload and nothing to renew. Each status change is recorded in the repository's activity.
Use the domain
Once the status is Active, the repository answers at the root of the domain:
xml
<repository>
<id>codesoh</id>
<url>https://maven.example.com/</url>
</repository>Access is unchanged: a private repository on a custom domain still needs a token, and a public one still doesn't.
The Artifex address keeps working as well, so you can move builds over one at a time. Because the domain points at the repository and not at its URL name, renaming the repository doesn't break the domain.
Disconnect a domain
To disconnect a domain, follow these steps:
- Open the repository and go to Domains.
- In the domain's row, click Remove.
The domain stops serving the repository. Remove the CNAME record afterwards. Builds that still use the domain fail until you point them at another address.
Deleting a repository disconnects its domains.