How to get my Ubuntu server a domain name
Solution 1:
If you want a free solution, you can use Dynamic DNS for example www.noip.com. But with a 'free' solution, comes a catch: Your hostname will be something like "myserver.no-ip.info" rather than something nice like "myserver.com" or whatever you like.
Those you will need to register for a hostname and pay for it.
And after that comes the next step of allowing incoming connection on your home gateway and redirect the incoming request to your Ubuntu Server (Port Forwarding)