A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cloud.google.com/compute/docs/instances/create-ptr-record below:

Create a PTR record for a VM instance | Compute Engine Documentation

Create a PTR record for a VM instance

Stay organized with collections Save and categorize content based on your preferences.

Configurable PTR records let you define the reverse DNS record associated with the external IP address of a VM instance so that applications that rely on these records can operate as intended.

Some applications require reverse DNS records (PTR records) to resolve IP addresses to domain names. For example, applications that use SMTP require a PTR record that points to the domain from which an email is being sent. Without that record, spam filters can mark emails with low reputation, which causes email to end up in spam folders or not be sent at all.

You can add PTR records to only the primary network interface of a VM instance. PTR records are not available for load balancer frontends, Cloud NAT, or other non-VM IP addresses.

IPv6 PTR records are only available if the instance's primary network interface is connected to a dual-stack or IPv6-only subnet that has an external IPv6 address range. For dual-stack network interfaces, you can have separate IPv4 and IPv6 PTR records.

To create custom PTR records that override the automatically created internal DNS PTR names, see Managed reverse lookup zones.

Before you begin Verify your domain ownership

Before you create a VM with a custom PTR record, verify that you own the domain name. Verifying ownership is a security measure to prove to Google that you are the domain owner.

You can verify your domain name in 2 ways:

Verify by using Search Console
  1. Open Search Console and sign in by using the Google Account that you will use to add a PTR record to your instance. You can verify domain ownership with multiple accounts.
  2. Enter the PTR domain name.
  3. Click Continue.
  4. Follow the instructions, and then click Go to Property.
  5. Click on Settings (found in the menu on the left near the bottom), and then click Ownership Verification.

After you verify that you own the domain, in the Settings pane, click on Users to see other verified owners. To add PTR records in other domains, click the property picker on the left that displays your current domain. Click Add a property to add those domains.

If your domain name is not immediately verified, use the Recommended Method to obtain verification.

Verify by adding your VM's IP address to your DNS configuration
  1. If your VM does not exist yet, reserve a regional static external IP address and use it later during VM creation.
  2. Add an "A" record with the VM's external IP address to the DNS configuration of your domain.
Create VM instances with PTR records

You can specify PTR records when you create new instances. To add a PTR record for an existing instance, see Add PTR records.

Console
  1. In the Google Cloud console, go to the Create an instance page.

    Go to Create an instance

  2. Specify the VM details.

  3. Expand the Advanced options section, and then do the following:

    1. Expand the Networking section.
    2. Create one or more network interfaces to use with this VM. Alternatively, you can use the default network interface.
    3. In the Network interfaces section, expand the first network interface, which is the primary network interface.
    4. In the Public DNS PTR record section, select each type of PTR record that you want to add.
    5. In the PTR domain name field, enter a domain name for each type of PTR record that you want to add.
    6. In the External IPv4 address or External IPv6 address field, choose your previously reserved IP address. If you have verified your VM's IP address through your DNS configuration, then you must specify that address.
    7. To confirm the network interface settings, click Done.
  4. Configure the remaining properties for your new VM.

  5. At the bottom of the page, click Create.

After the VM starts, you can run a reverse DNS lookup on the external IP address of your VM to confirm that the PTR record is working as expected.

gcloud REST Add PTR records

You can add PTR records by updating the access configuration on the primary network interface, nic0, of a VM instance.

Console
  1. In the Google Cloud console, go to the VM instances page.

    Go to VM instances

  2. Click the instance that you want to edit.

  3. Click Edit.

  4. In the Network interfaces section, click the primary network interface.

  5. In the Public DNS PTR record section, select each type of PTR record that you want to add.

  6. In the PTR domain name field, enter a domain name for each type of PTR record that you want to add.

  7. Click Done, and then click Save.

gcloud
  1. If your VM doesn't have an access configuration, add one by using the gcloud compute instances add-access-config command.

    gcloud compute instances add-access-config INSTANCE_NAME
    

    Replace INSTANCE_NAME with the name of your instance.

  2. Update the access configuration to add the PTR record by using the gcloud compute instances update-access-config command. To add both IPv4 and IPv6 PTR records, use the following commands individually.

    Replace the following:

REST
  1. If your VM doesn't have an access configuration, add one by making a POST request to the instances.addAccessConfig method.

    POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE_NAME/addAccessConfig?networkInterface="nic0"
    
  2. Update the access configuration to add the PTR record by making a POST request to the instances.updateAccessConfig method. To add both IPv4 and IPv6 PTR records, make the following requests individually.

    Replace the following:

Remove PTR records

To remove PTR records, update the access configuration on the primary network interface, nic0, of a VM instance. When you remove a PTR record, Google Cloud responds to reverse DNS lookups with a default fully qualified domain name of googleusercontent.com.

Console
  1. In the Google Cloud console, go to the VM instances page.

    Go to VM instances

  2. Click the instance that you want to edit.

  3. Click Edit.

  4. In the Network interfaces section, click the primary network interface.

  5. In the Public DNS PTR record section, clear the checkbox for each type of PTR record that you want to remove.

  6. Click Done, and then click Save.

gcloud

To remove a PTR record, use the gcloud compute instances update-access-config command. To remove both IPv4 and IPv6 PTR records, use the following commands separately.

Replace INSTANCE_NAME with the name of the instance to update.

REST

To remove a PTR record, make a POST request to the instances.updateAccessConfig method. To remove both IPv4 and IPv6 PTR records, make the following requests individually.

Replace the following:

Limitations What's next

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["PTR records allow the reverse DNS lookup of a VM's external IP address to its domain name, which is crucial for applications like SMTP to avoid being flagged by spam filters."],["PTR records can only be applied to the primary network interface of a VM instance and are not available for load balancer frontends, Cloud NAT, or non-VM IP addresses."],["To add or update a PTR record, you must first verify domain ownership either through Google Search Console or by adding the VM's IP address to your DNS configuration."],["PTR records can be added or updated on an existing VM instance through the Google Cloud console, `gcloud` command-line tool, or REST API by modifying the primary network interface settings."],["IPv6 PTR records are available for instances with primary network interface connected to dual-stack or IPv6-only subnets with external IPv6 address range."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4