Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI Studio
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Service page
Yandex Cloud DNS
Documentation
Yandex Cloud DNS
  • Getting started
    • All guides
      • Creating a record
      • Updating a record
      • Deleting a record
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • FAQ
  1. Step-by-step guides
  2. Records
  3. Deleting a record

Deleting a resource record

Written by
Yandex Cloud
Updated at July 14, 2025

To delete a resource record:

Management console
CLI
Terraform
API
  1. In the management console, select the folder containing the DNS zone with the record you want to delete.
  2. Select Cloud DNS.
  3. Select the zone from the list.
  4. Find the record you want to delete and click in its row.
  5. In the menu that opens, click Delete.
  6. In the window that opens, click Delete.

If you do not have the Yandex Cloud CLI installed yet, install and initialize it.

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

  1. See the description of the CLI command for deleting a record:

    yc dns zone delete-records --help
    
  2. Get a list of all zone records:

    yc dns zone list-records --name <zone_name>
    
  3. Delete the record:

    yc dns zone delete-records --name <zone_name> \
    --record "<domain_name> <TTL> <record_type> <value>"
    

If you do not have Terraform yet, install it and configure the Yandex Cloud provider.

To delete a DNS resource record created with Terraform, do the following:

  1. Open the Terraform configuration file and delete the fragment describing the DNS record.

    Terraform DNS record description example
    ...
    resource "yandex_dns_recordset" "rs1" {
      zone_id = yandex_dns_zone.zone1.id
      name    = "srv.example.com."
      type    = "A"
      ttl     = 200
      data    = ["10.1.0.1"]
    }
    ...
    
  2. In the command line, navigate to the directory with the Terraform configuration file.

  3. Check the configuration using this command:

    terraform validate
    

    If the configuration is correct, you will get this message:

    Success! The configuration is valid.
    
  4. Run this command:

    terraform plan
    

    You will see a detailed list of resources. No changes will be made at this step. If the configuration contains errors, Terraform will show them.

  5. Apply the changes:

    terraform apply
    
  6. Type yes and press Enter to confirm changes.

    You can check the updates in the management console or using this CLI command:

    yc dns zone list-records <zone_name>
    

To delete a resource record, use the updateRecordSets REST API method for the DnsZone resource or the DnsZoneService/UpdateRecordSets gRPC API call.

Was the article helpful?

Previous
Updating a record
Next
Overview
© 2025 Direct Cursus Technology L.L.C.