> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blaxel.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# HTTP validation

> Validate the TLS certificate of an application custom domain over HTTP, without publishing a DNS validation record.

<Note>
  This feature is currently in private preview and is not recommended for production use.

  For more information and to gain access, [contact us on Discord](https://discord.gg/CsWKUZUHFQ) or [request access](https://blaxel.ai/contact?message=I%20want%20to%20get%20preview%20access%20to%20HTTP%20validation%20for%20custom%20domains%20for%20the%20following%20use%20case%3A).
</Note>

HTTP validation lets Blaxel validate the TLS certificate of a [custom domain](/Infrastructure/Custom-domains) once the domain resolves to Blaxel. You only publish the routing records: there is no validation record to add with your DNS provider.

## How it works

Point your domain to Blaxel with the routing records, then click Verify. Blaxel validates the certificate over HTTP once the domain resolves to Blaxel. Verification usually completes within a few minutes of DNS propagation. Click Verify again if the first attempt reports that validation is still pending.

HTTP validation is only available for application domains with exact host names. Preview domains use a wildcard certificate, which can only be validated with DNS. HTTP validation is rejected for wildcard names and wildcard subject alternative names.

## DNS records

The records to publish depend on the host name:

* Subdomain (for example `shop.client.com`): one CNAME record from the subdomain to the Blaxel routing endpoint.
* Apex domain (for example `client.com`): an ALIAS, ANAME or flattened CNAME record from the apex to the Blaxel routing endpoint, plus a TXT record named `_cf-challenge.client.com` whose value is the Blaxel routing endpoint shown in the console.
* Apex with `www` as a subject alternative name: the two apex records above plus a CNAME record from `www` to the Blaxel routing endpoint. No TXT record is needed for `www`.

The console and the API return the exact records for your domain.

## Select HTTP validation

In the [Blaxel Console](https://app.blaxel.ai/), set the domain type to Applications, and choose HTTP under Certificate Validation when adding the domain.

With the API or SDKs, set `spec.validationMethod` to `http` when creating the domain. Omitting the field uses DNS validation.

```bash theme={null}
curl -X POST 'https://api.blaxel.ai/v0/customdomains' \
  -H 'X-Blaxel-Authorization: Bearer YOUR-API-KEY' \
  -H 'X-Blaxel-Workspace: YOUR-WORKSPACE' \
  -H 'Content-Type: application/json' \
  -d '{
    "metadata": { "name": "client.com" },
    "spec": {
      "domainType": "applications",
      "subjectAlternativeNames": ["www.client.com"],
      "validationMethod": "http"
    }
  }'
```

Related pages:

<CardGroup cols={2}>
  <Card title="Custom domains" href="/Infrastructure/Custom-domains">
    Register, verify and share custom domains for your workspace.
  </Card>

  <Card title="Applications" href="/Applications/Overview">
    Serve AI-generated software on stable public endpoints with custom URLs.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.