How to change Server Name (IP address to domain Name in Magento)

In Craig tutorials- how to install magneto on Ubuntu 16.04, He added the server IP address to the Apache configure file. My question is if someone has a domain name, can he/she replace the Sever IP with the domain name?

Secondly, in his admin, he maintained the server IP address instead of the domain name. How does one change the server IP address to a domain name?
Right now if I type in my domain name, it routes me back to my IP address.

Changing the Server Name in the Apache Configuration has no relation to the Domain Name that Magento uses. So, avoid changing this configuration unless you’re migrating to a server with a different IP address.

If you simply want to update the Domain Name that Magento uses, then I go over this topic in the following videos and articles: