---
updatedAt: 2026-03-01T18:30:31.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/edge-hostnames/llms.txt
---

# Get an edge hostname by DNS zone and record name

```curl cURL
recordName="www.example.com"
dnsZone="edgesuite.net"

egcurl --eg-section default --request GET \
  --url "https://$hostname/hapi/v1/dns-zones/$dnsZone/edge-hostnames/$recordName" \
  --header "Accept: application/json" 
```

```node Node
const EdgeGrid = require("akamai-edgegrid");
const os = require("os");
const edgercPath = os.homedir + "/.edgerc.txt";
const edgercSection = "default";  
const eg = new EdgeGrid({
  path: edgercPath,
  section: edgercSection
});   

const recordName = "www.example.com";
const dnsZone = "edgesuite.net";

eg.auth({
  path: `/hapi/v1/dns-zones/${dnsZone}/edge-hostnames/${recordName}`,
  method: "GET",
  headers: {
    
    "Accept": "application/json"}                    
});
eg.send(function(error, response, body) {
  console.log(body);    
});
```

```python Python
import requests
from akamai.edgegrid import EdgeGridAuth, EdgeRc
from urlparse import urljoin

edgerc = EdgeRc('~/.edgerc.txt')
section = 'default'
baseurl = 'https://%s' % edgerc.get(section, 'host')

session = requests.Session()
session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
recordName = "www.example.com"
dnsZone = "edgesuite.net"
 

path= '/hapi/v1/dns-zones/{}/edge-hostnames/{}'.format(dnsZone, recordName)
headers = {
  
  "Accept": "application/json"}  

result = session.get(urljoin(baseurl, path), headers=headers)
print(result.status_code)
print(result.json())  
```

```json Response Example
{
    "edgeHostnameId": 1,
    "recordName": "www.example.com",
    "dnsZone": "edgesuite.net",
    "securityType": "ENHANCED-TLS",
    "useDefaultTtl": true,
    "useDefaultMap": true,
    "ipVersionBehavior": "IPV6_IPV4_DUALSTACK",
    "productId": "DSD",
    "ttl": 21600,
    "map": "e;dscb.akamaiedge.net",
    "slotNumber": 11838,
    "comments": "Created for example.com"
}
```

# Set up authorization

<!-- curl@0-100 -->
<!-- node@0-100 -->
<!-- python@0-100 -->

Before you can use this API, you need to [Create authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials). 

Then, you can use these code samples to apply the token values to your requests.

# Get the record name and DNS zone

<!-- curl@1-2 -->
<!-- node@10-11 -->
<!-- python@11-12 -->

Run the [List edge hostnames] (https://techdocs.akamai.com/edge-hostnames/recipes/list-edge-hostnames) operation, choose the edge hostname that you are checking. Note the edge hostname's `recordName` and `dnsZone`.
- The  `recordName` is the origin domain portion of the edge hostname, for example the `www.example.com` portion of `www.example.com.edgesuite.net`.
- The `dnsZone` is the Akamai-specific portion of the edge hostname, for example the `edgesuite.net` portion of `www.example.com.edgesuite.net`. Akamai DNS zones include; `edgesuite.net`, `edgekey.net`, `akamaized.net` and `edgesuite-staging.net`. 

[Edge hostname domains] (https://techdocs.akamai.com/edge-hostnames/docs/edge-hn-domains) provides more information.

# Form the URL

<!-- curl@1-2,5 -->
<!-- node@10-11,14 -->
<!-- python@11-12,15 -->

Enter the `recordName` and `dnsZone` values into the URL.

# Call the API

<!-- curl@1-100 -->
<!-- node@1-100 -->
<!-- python@1-100 -->

Call GET on the request URL.

# Review the response

<!-- node@101 -->
<!-- python@101 -->

The response returns the specific edge hostname's details.