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

# Delete an edge hostname

```curl cURL
recordName="www.example.com"
dnsZone="edgesuite.net"
comments="Delete for example.com"
statusUpdateEmail="someperson@somedomain.com"

egcurl --eg-section default --request DELETE \ 
  --url "https://$hostname/hapi/v1/dns-zones/$dnsZone/edge-hostnames/$recordName?comments=$comments&statusUpdateEmail=$statusUpdateEmail" \
```

```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: "DELETE"
  qs: {
    "comments": "Delete for example.com",
    "statusUpdateEmail": "someperson@somedomain.com"
}                   
});
eg.send(function(error, response, body) {
  console.log(body);    
});
```

```python Python
import requests
from akamai.edgegrid import EdgeGridAuth, EdgeRc
from urllib.parse 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)
 
querystring = {
  "comments": "Delete for example.com",
  "statusUpdateEmail": "someperson@somedomain.com"
}  

result = session.delete(urljoin(baseurl, path), params=querystring)
print(result.status_code)

if result.json():
    print(result.json())   
```

```json Response Example
{
    "action": "DELETE",
    "changeId": 1,
    "comments": "Delete for example.com",
    "status": "SUCCEEDED",
    "statusMessage": "File successfully deployed to Akamai's network",
    "statusUpdateDate": "2018-10-17T20:21:17.0Z",
    "statusUpdateEmail": "someperson@somedomain.com",
    "submitDate": "2018-10-17T20:21:12.0Z",
    "submitter": "asmith",
    "submitterEmail": "asmith@akamai.com",
    "edgeHostnames": [
        {
            "edgeHostnameId": 1,
            "recordName": "www.example.com",
            "dnsZone": "edgesuite.net",
            "securityType": "ENHANCED-TLS",
            "useDefaultTtl": false,
            "useDefaultMap": false,
            "ttl": 21600,
            "map": "e;b.akamaiedge.net",
            "slotNumber": 11838,
            "ipVersionBehavior": "IPV4",
            "comments": "Edited for Super Bowl"
        }
    ]
}
```

# 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 to be deleted, and note its `recordName` and `dnsZone` values.

# Add a comment

<!-- curl@3 -->
<!-- node@17 -->
<!-- python@18 -->

Optionally, set the `comments` query parameter to include any comments about the edge hostname being deleted.

# Set up email notifications

<!-- curl@4 -->
<!-- node@18 -->
<!-- python@19 -->

Optionally, set the `statusUpdateEmail` query parameter to the addresses you wish to notify when updates occur. To specify more than one email address, separate the addresses with a comma (,) or repeat the parameter with each address.

# Form the URL

<!-- curl@1-2,6 -->
<!-- node@14,10-11,17-18 -->
<!-- python@15,11-12,18-19 -->

Enter the `recordName` and `dnsZone` values into the URL. Optionally, add comments and email addresses.

# Call the API

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

Call DELETE on the request URL.

# Review the response

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

The operation responds with the status and details of the change request, which the `Location` response header links to.