---
updatedAt: 2026-06-26T19:33:06.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/terraform/llms.txt
---

# Search domains

akamai_property_domainownership_search_domains

Get validation statuses of specified domains. For any nonexistent domains, the response returns the closest matching domain statuses.

```json Query
data "akamai_property_domainownership_search_domains" "my-domain-statuses" {
  domains = [
    {
      domain_name      = "example.com"
      validation_scope = "HOST"
    },
    {
      domain_name      = "sub.example.com"
      validation_scope = "WILDCARD"
    }
  ]
}

output "my-domain-statuses" {
  value = data.akamai_property_domainownership_search_domains.my-domain-statuses
}
```
```json Standard output
my-domain-statuses = {
  domains = [
    {
      account_id                = "A-CCT1234"
      domain_name               = "example.com"
      domain_status             = "VALIDATED"
      validation_challenge      = {
        cname_record    = {
          name   = "_acme-challenge.example.com"
          target = "ac.1ab23c45def678gh9ij01klm23n4op.example.com.validate-akdv.net"
        }
        expiration_date = "2025-05-04T16:33:54Z"
        http_file       = {
          content      = "abcDeFghi12JK-LmNopQr3ST-uVwX4Y_zAbCDEfgijkLmnoPqRstuV5-wXy678Z"
          content_type = "text/plain"
          path         = "https://example.com/.well-known/akamai/akamai-challenge/abc1dEf3gh-ij3hlmoPr"
        }
        http_redirect   = {
          from = "https://example.com/.well-known/akamai/akamai-challenge/abc1dEf3gh-ij3hlmoPr"
          to   = "https://validation.akamai.com/.well-known/akamai/akamai-challenge/abcDeFghi12JK-LmNopQr3ST-uVwX4Y_zAbCDEfgijkLmnoPqRstuV5-wXy678Z"
        }
        txt_record      = {
          name  = "_akamai-host-challenge.example.com"
          value = "abcDeFghi12JK-LmNopQr3ST-uVwX4Y_zAbCDEfgijkLmnoPqRstuV5-wXy678Z"
        }
      }
      validation_completed_date = "2025-02-03T16:35:00Z"
      validation_level          = "FQDN"
      validation_method         = "HTTP"
      validation_requested_by   = "jsmith"
      validation_requested_date = "2025-02-03T16:33:54Z"
      validation_scope          = "HOST"
    },
    {
      account_id                = "A-CCT1234"
      domain_name               = "sub.example.com"
      domain_status             = "VALIDATED"
      validation_challenge      = {
        cname_record    = {
          name   = "_acme-challenge.sub.example.com"
          target = "ac.z9yx87wv654utsrq32ponm10lk987j.sub.example.com.validate-akdv.net"
        }
        expiration_date = "2025-05-04T16:18:23Z"
        http_file       = null
        http_redirect   = null
        txt_record      = {
          name  = "_akamai-wildcard-challenge.sub.example.com"
          value = "zyXwyUT98Sr-qPonmLkJi7Hg-FeDC6b_AzywVusTrQpONmlkJ5iHGf-eDc43b"
        }
      }
      validation_completed_date = "2025-02-03T16:28:17Z"
      validation_level          = "ROOT/WILDCARD"
      validation_method         = "DNS_TXT"
      validation_requested_by   = "jsmith"
      validation_requested_date = "2025-02-03T16:18:23Z"
      validation_scope          = "WILDCARD"
    },
  ]
}
```

## Arguments

Pass a list of domains in the `data` block to get their details.

<table>
    <thead>
        <tr>
            <th>Argument</th>
            <th>Required</th>
            <th>Description</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><code>domains</code></td>
            <td class="rqcent">✔</td>
            <td>A list of domains. Each domain record includes:
              <ul>
                <li><code>domain_name</code>. Required. Your domain's name.</li>
                <li><code>validation_scope</code>. Required. Your domain's validation scope. Possible values are:
                <ul>
                    <li><code>HOST</code>. The scope is only the exactly specified domain.</li>
                    <li><code>WILDCARD</code>. The scope covers any hostname within one subdomain level.</li>
                    <li><code>DOMAIN</code>. The scope covers any hostnames under the domain, regardless of the level of subdomains.</li>
                </ul></li>
              </ul>
            </td>
        </tr>
    </tbody>
</table>

## Attributes

Returns to you is a set of `domains` with their details.

<table>
    <thead>
        <tr>
            <th>Attribute</th>
            <th>Description</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><code>account_id</code></td>
            <td>Your account's ID.</td>
        </tr>
        <tr>
            <td><code>domain_status</code></td>
            <td>The domain's validation status. Possible values are:
                <ul>
                    <li><code>REQUEST_ACCEPTED</code>. When you successfully submit the domain for validation.</li>
                    <li><code>VALIDATION_IN_PROGRESS</code>. When DOM has initiated domain validation, either via background jobs or an API request, but the validation hasn't succeeded. This status remains until the domain challenges are correctly configured and successfully verified.</li>
                    <li><code>VALIDATED</code>. When the validation is completed successfully. Akamai recognizes you as the domain owner.</li>
                    <li><code>TOKEN_EXPIRED</code>. When you haven't completed the validation in the requested time frame and the challenge token is not valid anymore. You need to generate new validation challenges for the domain.</li>
                    <li><code>INVALIDATED</code>. When the domain was invalidated and Akamai doesn't recognize you as its owner.</li>
                </ul>
            </td>
        </tr>
        <tr>
            <td><code>validation_level</code></td>
            <td>The domain's validation level, either <code>FQDN</code> (fully qualified domain name) or <code>ROOT/WILDCARD</code>.</td>
        </tr>
        <tr>
            <td><code>validation_method</code></td>
            <td>The method used to validate the domain. Possible values are:
                <ul>
                    <li><code>DNS_CNAME</code>. For this method, Akamai generates a <code>cname_record</code> that you copy as the <code>target</code> to a <code>CNAME</code> record of your DNS configuration. The record's name needs to be in the <code>_acme-challenge.domain-name</code> format.</li>
                    <li><code>DNS_TXT</code>. For this method, Akamai generates a <code>txt_record</code> with a token <code>value</code> that you copy as the <code>target</code> to a <code>TXT</code> record of your DNS configuration. The record's name needs to be in the <code>_akamai-{host|wildcard|domain}-challenge.domainName</code> format based on the validation scope.</li>
                    <li><code>HTTP</code>. Applies only to domains with the <code>HOST</code> validation scope. For this method, you create the file containing a token and place it on your HTTP server in the location specified by the <code>domains[0].validation_challenge.http_file.path</code> or use a redirect to the <code>domains[0].validation_challenge.http_redirect.to</code> with the token.</li>
                    <li><code>SYSTEM</code>. This method refers to domains that were automatically validated before Domain Validation Manager (DOM) was introduced.</li>
                    <li><code>MANUAL</code>. For this method, the DOM team manually performed the validation.</li>
                </ul>
            </td>
        </tr>
        <tr>
            <td><code>validation_requested_by</code></td>
            <td>The name of the user who requested the domain validation.</td>
        </tr>
        <tr>
            <td><code>validation_requested_date</code></td>
            <td>The timestamp indicating when the domain validation was requested.</td>
        </tr>
        <tr>
            <td><code>validation_completed_date</code></td>
            <td>The timestamp indicating when the domain validation was completed.</td>
        </tr>
        <tr>
            <td><code>validation_challenge</code></td>
            <td>The domain's validation challenge details. Includes:
                <ul>
                    <li><code>cname_record</code>. The details of the <code>CNAME</code> record you copy to your DNS configuration to prove you own the domain. You should use the <code>DNS_CNAME</code> method in most cases. Includes:
                        <ul>
                            <li><code>name</code>. The <code>CNAME</code> record for your domain that you add to the DNS configuration.</li>
                            <li><code>target</code>. The <code>target</code> value you set in the <code>CNAME</code> record that validates the domain ownership.</li>
                        </ul>
                    </li>
                    <li><code>txt_record</code>. The details of the <code>TXT</code> record with the challenge token that you copy to your DNS configuration to prove you own the domain. Includes:
                        <ul>
                            <li><code>name</code>. The hostname where you should add the <code>TXT</code> record to validate the domain ownership.</li>
                            <li><code>value</code>. The token you need to copy to the DNS <code>TXT</code> record that validates the domain ownership.</li>
                        </ul>
                    </li>
                        <li><code>http_file</code>. Available only for the <code>HOST</code> validation scope. The details for the HTTP validation method in which you create a file containing a token and save it on your HTTP server at the provided URL. Alternatively, you can use the <code>http_redirect</code> method. Includes:
                        <ul>
                            <li><code>path</code>. The URL where you should place the file containing the challenge token.</li>
                            <li><code>content</code>. The content of the file that you should place at the specified URL.</li>
                            <li><code>content_type</code>. The content type of the file containing the token.</li>
                        </ul>
                    </li>
                    </li>
                        <li><code>http_redirect</code>. Available only for the <code>HOST</code> validation scope. The details for the HTTP validation method in which you use a redirect URL with the token. Alternatively, you can use the <code>http_file</code> method. Includes:
                        <ul>
                            <li><code>from</code>. The location on your HTTP server where you set up the redirect.</li>
                            <li><code>to</code>. The redirect URL with the token that you place on your HTTP server.</li>
                        </ul>
                    </li>
                    <li><code>expiration_date</code>. The timestamp indicating when the challenge data expires.</li>
                </ul>
            </td>
        </tr>
    </tbody>
</table>

# Sibling pages

* [Account hostnames](https://techdocs.akamai.com/terraform/docs/pm-ds-account-hostnames.md)
* [CP code](https://techdocs.akamai.com/terraform/docs/pm-ds-cp-code.md)
* [CP codes](https://techdocs.akamai.com/terraform/docs/pm-ds-cp-codes.md)
* [Edge hostname](https://techdocs.akamai.com/terraform/docs/pm-ds-edge-hostname.md)
* [Edge hostnames](https://techdocs.akamai.com/terraform/docs/pm-ds-edge-hostnames.md)
* [Domain](https://techdocs.akamai.com/terraform/docs/pm-ds-domain.md)
* [Domains](https://techdocs.akamai.com/terraform/docs/pm-ds-domains.md)
* [Hostname activation](https://techdocs.akamai.com/terraform/docs/pm-ds-hostname-activation.md)
* [Hostname activations](https://techdocs.akamai.com/terraform/docs/pm-ds-hostname-activations.md)
* [Hostname audit history](https://techdocs.akamai.com/terraform/docs/pm-ds-hostname-audit-history.md)
* [Hostnames](https://techdocs.akamai.com/terraform/docs/pm-ds-hostnames.md)
* [Hostnames diff](https://techdocs.akamai.com/terraform/docs/pm-ds-hostnames-diff.md)
* [Include](https://techdocs.akamai.com/terraform/docs/pm-ds-include.md)
* [Include activation](https://techdocs.akamai.com/terraform/docs/pm-ds-include-activation.md)
* [Include parents](https://techdocs.akamai.com/terraform/docs/pm-ds-include-parents.md)
* [Include rules](https://techdocs.akamai.com/terraform/docs/pm-ds-include-rules.md)
* [Includes](https://techdocs.akamai.com/terraform/docs/pm-ds-includes.md)
* [Products](https://techdocs.akamai.com/terraform/docs/pm-ds-products.md)
* [Properties](https://techdocs.akamai.com/terraform/docs/pm-ds-properties.md)
* [Property](https://techdocs.akamai.com/terraform/docs/pm-ds-property.md)
* [Property activation](https://techdocs.akamai.com/terraform/docs/pm-ds-property-activation.md)
* [Search](https://techdocs.akamai.com/terraform/docs/pm-ds-search.md)
* [Rule formats](https://techdocs.akamai.com/terraform/docs/pm-ds-rule-formats.md)
* [Rules](https://techdocs.akamai.com/terraform/docs/pm-ds-property-rules.md)
* [Rules builder](https://techdocs.akamai.com/terraform/docs/pm-ds-rules-builder.md)
* [Rules template](https://techdocs.akamai.com/terraform/docs/pm-ds-rules-template.md)