In this article we are going to learn how to setup a subdomain which points to an external public IP where we host our application. For example DigitalOcean where you manage your droplets.
In this tutorial, I am going to show you how to create subdomain on BlueHost and map it with your VPS on DigitalOcean.
Just follow few steps and you are all set.
First of all you must have credentials to login to the cPanel of your site.
Login to your cPanel and search for advance DNS zone editor option
Click on this option and you will find list of available domain with their IPs and sub-domains if any.
Create a record, Add your subdomain name here, then your TTL value. Then your site type which you want to point.
select A if your are pointing to an external public IP which must be static. and it must be IPv4 if it is IPV6 then select AAAA CNAME if you are pointing to a domain name or sub-domain.
Now in Address field add the address or domain name.
Then click Add Record button.
Voila! Now wait for at least 24 to 72 hours. It will take this much time to get effect. This time is not sure.
If you want to edit or cancel a detail then you can select and update or cancel.
Once the new DNS propagation reflects everywhere, your website will be ready to use by subdomain name.
I hope you enjoyed the article. For more blogs, keep following me or subscribe to my Newsletter!
Have a happy coding!!