Changing DNS Zone Records

Change the records that contain domain information for a DNS zone. You can change various components of the records within zones, such as time-to-live (TTL) and relevant RDATA.

For example, the RDATA of an A or AAAA record contains an IP address for a domain name, while MX records contain information about the mail server for a domain. Oracle Cloud Infrastructure normalizes all RDATA into the most machine-readable format. The returned presentation of RDATA might differ from its initial input. For more information, see Records.
Note

  • Some records are protected and contain information that you can't change.
  • You can't manage records when a zone isn't active.
    • If the zone is updating, wait a few moments and try again.
    • If the zone is in a failed state, delete the zone and re-create it. Be sure the zone name is unique, and that there is no error in any zone file you might have used to create the zone.

For general service information, see the DNS Service Overview

    1. Open the navigation menu and click Networking. Under DNS management, click Zones.
    2. Under List scope, select the compartment that contains the zone in which you want to update a record.
    3. Click the name of the zone to open its details page.
      If you're updating a record in a private zone, click the Private Zones tab and then click the zone name. You can use filters to sort by zones that are protected (system generated) or by associated private view names.
    4. Under Resources, click Records.

      A list of records appears. Records that have the same name, type, and TTL are displayed as a single RRset in the Zone Records list.

    5. Click Manage Records.
    6. Use the Filters options to filter by record state or type.
    7. Click the Actions menu (Actions Menu) for the record that you want to update, and select Edit.
    8. In the Edit Record panel, make the changes, and then click Save changes.
      When records are added, they're staged to combine records in an RRSet. Record changes don't take effect until they're published in the next steps.
    9. Click Publish Changes.
    10. On the Confirm page, review the changes and compare them with the previous published version, and then click Confirm publish changes.
  • Important

    • If a record in the zone or RRset doesn't exist in the request body, the record is removed from the zone or RRset.
    • If a specified record doesn't exist, it's created. If the record exists, then it's updated to represent the record in the body of the request.
    • When the zone name is provided as a path parameter and PRIVATE is used for the scope query parameter then the viewId query parameter is required.
    • Use the record rrset update command and required parameters to edit a single record in an RRset.

      oci dns record rrset update --domain FQDN_1 --rtype "record_type_1" --zone-name-or-id zone_name or zone_OCID
      --items  '[{"domain":"FQDN_1","rdata":"updated_record_data" ,"rtype":"record_type_1","ttl":"time_to_live_seconds"}]' ... [OPTIONS]
    • Use the record zone update command and required parameters to bulk edit many records in a zone.

      oci dns record zone update --zone-name-or-id zone_name or zone_OCID --items  
      '[{"domain":"FQDN_1","rdata":"updated_record_data","rtype":"record_type_1","ttl":"time_to_live_seconds"};
      {"domain":"FQDN_2","rdata":"updated_record_data","rtype":"record_type_1","ttl":"time_to_live_seconds"}]' ... [OPTIONS]

    For a complete list of flags and variable options for CLI commands, see the CLI Command Reference.

  • Important

    • If a specified record doesn't exist, it's created. If the record exists, then it's updated to represent the record in the body of the request.
    • When the zone name is provided as a path parameter and PRIVATE is used for the scope query parameter then the viewId query parameter is required.
    • Run the UpdateRrset operation to edit a single record in an RRset in a zone. An RRset is defined as a group of records that have the same name, type, and TTL values.

    • Run the UpdateZoneRecords operation to bulk edit many records in a zone.