Skip to contentSkip to content

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 URL.

You need the repository's Admin role, and the repository owner needs a plan that includes custom domains. See Plans.

Connect a domain ​

To connect a domain, follow these steps:

  1. Open the repository and go to Domains.

  2. Click New domain.

  3. In the Hostname field, enter the hostname, such as maven.example.com.

  4. Click Add domain.

  5. At your DNS provider, add a CNAME record for that hostname pointing at the target that the page shows.

  6. If the page shows a verification record, add that TXT record as well.

  7. Click Check status until the status is Active.

A hostname connects to one repository. Domains under soh.gg, and the Artifex URL itself, can't be used.

Move a domain from another host ​

If the domain already serves a repository on another host, pre-validate it. Artifex then validates the domain and issues its certificate with TXT records while the other host still serves the domain, and the domain moves to Artifex when you change its CNAME record. Copy the repository's contents first, so that builds find every file after the move.

To move a domain, follow these steps:

  1. Open the repository and go to Domains.

  2. Click New domain.

  3. In the Hostname field, enter the hostname.

  4. Select Pre-validate, because another host serves it now, and then click Add domain.

  5. At your DNS provider, add the two TXT records that the page shows. Leave the CNAME record as it is.

  6. Click Check status until the status is Active. The certificate TXT record can take a few minutes to appear on the page.

  7. Change the domain's CNAME record to the target that the page shows.

Builds that use the domain resolve from Artifex as soon as their DNS lookups see the new CNAME record. Leave the TXT records in place.

Let Artifex add the records ​

If the domain is on Cloudflare, click Set the records up for me in the domain's row and approve the request in Cloudflare. Artifex adds the records to the domain's zone. Check the status a moment later. For a pre-validated domain, Artifex adds only the TXT records until the domain is active. After that, the same button changes the CNAME record.

The records ​

RecordNameValue
CNAMEThe hostname that you addedThe target shown on the Domains page
TXTShown on the page when verification is requiredShown next to the name
TXTShown on the page for a pre-validated domainShown next to the name

The Detected column shows whether each record was found, and a warning names any record that's missing.

Most DNS providers don't allow a CNAME record at the zone apex, so use a subdomain such as maven.example.com. Some providers offer CNAME flattening at the apex, which also works.

Status ​

StatusWhat it meansWhat to do
Pending DNSThe records aren't visible yetCheck the records and wait for them to propagate
Pending certificateThe records are visible and the certificate is being issuedWait, then check the status again
ActiveThe domain serves the repositoryPoint your builds at it
FailedVerification or certificate issuance didn't succeedRead the message on the page, correct the records, and check again

Use the domain ​

After the status is Active, the repository is served at the root of the domain:

xml
<repository>
  <id>artifex</id>
  <url>https://maven.example.com/</url>
</repository>

The Artifex URL continues to work, so you can move builds over one at a time. Changing the repository name doesn't affect the domain.

Choose the primary domain ​

While the repository's primary domain is Active, the repository's pages use it as the repository URL: the Maven address, the build snippets in Use this repository, and the download links. Otherwise, the pages use the Artifex URL.

The first domain that you add to a repository becomes its primary domain, and the Domains page marks it Primary. To make another domain primary, follow these steps:

  1. Open the repository and go to Domains.
  2. In the domain's row, click Make primary.

To use the Artifex URL instead, click Clear primary in the primary domain's row.

The repository's pages on the domain ​

The domain also serves the repository's pages. Opening https://maven.example.com/ shows the repository, and its pages are under /-/, such as https://maven.example.com/-/browse. Links to any other page, such as your tokens, open on the Artifex URL.

Disconnect a domain ​

To disconnect a domain, follow these steps:

  1. Open the repository and go to Domains.
  2. 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 repository URL.

Deleting a repository disconnects its domains.