> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# FQDN and hostname of a virtual machine

When you create a virtual machine (VM), the service assigns an [FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) to this VM. By using this FQDN, other VMs can access your VM within a single [network](../../vpc/overview#network).

You can configure the FQDN on your own or you can use the default FQDN:

* The format of the default FQDN is the following:

  ```text theme={null}
  <VM_ID>.<VM_network_ID>.compute.internal.
  ```

  In this case, the FQDN (as well as the VM's ID) is only known after the VM is created.

* The format of a custom FQDN is the following:

  ```text theme={null}
  <hostname>.<VM_network_ID>.compute.internal.
  ```

  You can [set the hostname](#how-to-customize-an-fqdn) when you create or update a VM.

You can configure an FQDN, but you cannot delete it.

The guest OS hostname of the VM is set up during the VM creation; it matches the FQDN. If the FQDN is changed later, the guest OS hostname does not change; and it remains the same as the FQDN was when the VM was created.

## How to get an FQDN

<Tabs>
  <Tab title="CLI">
    To get an FQDN of a VM, run the following command:

    ```bash theme={null}
    nebius compute instance get <VM_ID>
    ```

    The FQDN is specified in the `status.network_interfaces.fqdn` field of the output.
  </Tab>
</Tabs>

## How to customize an FQDN

If you do not want to use the default FQDN, you can use your own hostname instead of the VM's ID. To customize an FQDN, use the `hostname` parameter:

<Tabs>
  <Tab title="CLI">
    * [Create a VM](./manage#create-a-vm) with a customized FQDN:

      ```bash theme={null}
      nebius compute instance create \
         ... \
         --hostname <FQDN_prefix>
      ```

    * Change an FQDN of an existing VM:

      ```bash theme={null}
      nebius compute instance update --id <VM_ID> --hostname <FQDN_prefix>
      ```
  </Tab>

  <Tab title="Terraform">
    Use the following VM configuration:

    ```hcl theme={null}
    resource "nebius_compute_v1_instance" "my_vm" {
      ...
      hostname = "<FQDN_prefix>"
      ...
    }
    ```

    For more information, see [Create a VM](./manage#create-a-vm).
  </Tab>
</Tabs>

The hostname must be unique, and it cannot contain a full stop (`.`).

For example, if you pass over the `my-host` value for the `hostname` parameter, the FQDN is the following:

```text theme={null}
my-host.vpcnetwork-e00***.compute.internal.
```

If you do not use the `--hostname` parameter, the VM's ID is used instead of the hostname (according to the default FQDN).
