How to set custom hostname for your Private Server
To set a custom hostname, you need to own a Private Server and a domain, and know how to create and configure an A-Record to point to your server's IP address. The DNS record management service you use is not important - in this article, we use Cloudflare as an example, but you can use any service you prefer. With these requirements and knowledge in place, you can set a custom hostname for your Private Server.
Log in to your Cloudflare account and select the domain for which you want to set the A record.
In the domain's DNS settings, scroll down to the "DNS records" section.
Click on the "Add record" button.
In the "Type" field, select "A" from the dropdown menu.
In the "Name" field, enter the hostname or subdomain for which you want to set the A record. For example, if you want to set the A record for "www.example.com", you would enter "www" in the "Name" field.
In the "IPv4 address" field, enter the IP address of your Private Server.
Click on the "Add record" button to save the changes.
Once you have set the A record, it may take a few minutes for the changes to propagate across the internet. After that, the hostname or subdomain will resolve to the IP address that you specified in the A record.
As shown in the screenshot below, to set a custom hostname in Cloudflare, you need to point your VPN IP address (e.g., 45.45.45.45) to the hostname (e.g., test.octovpn.net) and disable the Cloudflare proxy protection by unchecking the orange cloud icon. In this example, the hostname we want to use is "test.octovpn.net".

Log in to your Cloudflare account and select the domain for which you want to set the A record.
In the domain's DNS settings, scroll down to the "DNS records" section.
Click on the "Add record" button.
In the "Type" field, select "A" from the dropdown menu.
In the "Name" field, enter the hostname or subdomain for which you want to set the A record. For example, if you want to set the A record for "www.example.com", you would enter "www" in the "Name" field.
In the "IPv4 address" field, enter the IP address of your Private Server.
Click on the "Add record" button to save the changes.
Once you have set the A record, it may take a few minutes for the changes to propagate across the internet. After that, the hostname or subdomain will resolve to the IP address that you specified in the A record.
As shown in the screenshot below, to set a custom hostname in Cloudflare, you need to point your VPN IP address (e.g., 45.45.45.45) to the hostname (e.g., test.octovpn.net) and disable the Cloudflare proxy protection by unchecking the orange cloud icon. In this example, the hostname we want to use is "test.octovpn.net".

Updated on: 10/12/2022
Thank you!