difference between hostname and domain name
hostname is the name given to the end-point (the machine in question) and will be used to identify it over DNS if that is configured. domain is the name given to the 'network' it will be required to reach the network from an external point (like the Internet)
Domain Name is a name of your own website through which you can access/request your information from an online server where you host or upload the content of your website and that online server name is called host name for your website.