Hi,
As Jimmy mentioned this is not possible. I would recommend you to create a domain for your server and then slowly map your domain to your newly created ARM VM. You will need to modify your core any which ways.
But when you map use your domain, you will not be changing the code, instead you will be modifying the CNAME record to change the FQDN in future.
Regards,
Karthik Srinivas