Skip to content
WP Engine Developers

Adding and Verifying Domains

This guide explains how to add and verify a domain for your environment using the WP Engine Hosting API. To ensure platform security, all root domains must be verified via a DNS TXT record before traffic can be routed to your site.

Use the Add Domain endpoint to add the domain to your environment.

Example request:

Add Domain
# Replace 12345 with your install ID
curl -X POST "https://api.wpengineapi.com/v1/installs/12345/domains" \
-u "$WPE_API_USER_ID:$WPE_API_PASSWORD" \
-H "Content-Type: application/json" \
-d '{
"name": "example.com",
"primary": false
}'

Example response:

{
"id": "e41fa98f-ea80-4654-b229-a9b765d0863a",
"name": "example.com",
"primary": false,
"duplicate": false,
"secure_all_urls": false,
"ownership_status": "TXT_VERIFICATION_PENDING",
"txt_verification_key": "_wpeproperty",
"txt_verification_value": "abc123def456ghi789jkl012",
"txt_verified_time": null,
"txt_verified_domain": null,
"network_type": "AN",
"network_details": {
"dns_config_info": {
"cname": "example.wpengine.com",
"a_records": ["192.0.2.1"]
},
"network_info": {
"status": "ACTIVE",
"ssl": {
"status": "pending"
}
}
},
"redirects_to": []
}

Key fields in the response for DNS configuration and verification:

  • txt_verification_key: The “name” or “host” for your TXT record.
  • txt_verification_value: The “value” or “content” for your TXT record.
  • network_details.dns_config_info.cname: The CNAME target for your domain.
  • network_details.dns_config_info.a_records: Array of IP addresses for A records.
  • ownership_status: This will initially return TXT_VERIFICATION_PENDING.

At your domain registrar (e.g., GoDaddy, Namecheap, etc.), add the records provided in the previous step:

  • TXT Record: Add a TXT record using the txt_verification_key for the Host/Name field and the txt_verification_value for the Value field.
  • Routing Record: Add your CNAME (from network_details.dns_config_info.cname) or A record (from network_details.dns_config_info.a_records) as provided in the API response.

Once the DNS records are saved, you must manually instruct WP Engine to look for them and move the domain out of the “unverified” state.

Use the Verify Domain TXT Record endpoint to trigger this check.

Example request:

Trigger Verification
# Replace 12345 with your install ID and the UUID with your domain ID
curl -X POST "https://api.wpengineapi.com/v1/installs/12345/domains/e41fa98f-ea80-4654-b229-a9b765d0863a/verification" \
-u "$WPE_API_USER_ID:$WPE_API_PASSWORD"

Example response:

{
"id": "e41fa98f-ea80-4654-b229-a9b765d0863a",
"name": "example.com",
"txt_verification_key": "_wpeproperty",
"txt_verification_value": "abc123def456ghi789jkl012",
"txt_verified_time": "2026-05-06T12:05:00.007Z",
"txt_verified_domain": "example.com"
}

The verification process typically completes within a few minutes. To confirm the domain is ready, use the Get Domain endpoint and check for the following values:

Example request:

Get Domain
# Replace 12345 with your install ID and the UUID with your domain ID
curl -X GET "https://api.wpengineapi.com/v1/installs/12345/domains/e41fa98f-ea80-4654-b229-a9b765d0863a" \
-u "$WPE_API_USER_ID:$WPE_API_PASSWORD"

Example response when verification is complete:

{
"id": "e41fa98f-ea80-4654-b229-a9b765d0863a",
"name": "example.com",
"primary": false,
"duplicate": false,
"secure_all_urls": false,
"ownership_status": "TXT_VERIFIED",
"txt_verification_key": null,
"txt_verification_value": null,
"txt_verified_time": "2026-05-06T12:05:00.007Z",
"txt_verified_domain": "example.com",
"network_type": "AN",
"network_details": {
"dns_config_info": {
"cname": "example.wpengine.com",
"a_records": ["192.0.2.1"]
},
"network_info": {
"status": "ACTIVE",
"ssl": {
"status": "active"
}
}
},
"redirects_to": []
}

Key fields to check:

  • ownership_status: Should now return TXT_VERIFIED.
  • txt_verified_time: Indicates the exact timestamp the verification handshake was completed.
  • txt_verified_domain: Confirms the specific domain successfully verified by the system.
  • txt_verification_key and txt_verification_value: Will be null once verified.

Once verified, traffic will begin routing automatically. If this domain was designated as the Primary Domain, that change will now take effect.

Last updated: