These are very beginner questions. I just got an instance of VPS with no domain name yet. The only way I can access my VPS is through SSH to a static IP.

(1) How do I register a domain name and host it on my VPS? I know I can register a domain at some 3rd party registrar like GoDaddy, but how do I "host" that on my VPS?

(2) How do I set up an email server that send emails and receive emails through the domain I register? What software do I need and how should I config it?

Thanks a lot in advance

  • Re: 1). While I'm unfamiliar with VPS's, I'll use a shared hosting example. You setup an addon domain, which lets the host co. know to expect traffic from that domain. The host tells you the domain name server(s) that it has assigned for that domain. You then go to your domain registrar interface and point the domain to the aforementioned domain name server(s). – akTed Jan 14 '13 at 2:09

There's a few things you need to do so I'll try and break it down in steps in the same order as you have asked.

Pointing your new domain to the VPS using GoDaddy

GoDaddy has their own dns manager and getting it to work with your domain is really simple, simple change the A record within the DNS manager to point to the IP address of your VPS. Below is a picture to display what setting I'm referring too.

GoDaddy IP VPS http://www.bybe.net/downloads/vps-godaddy-ip-a-record.jpg

Setting up Email Though the Domain

You mention that you want to receive emails and send emails using the domain, though mentioned that you want to host the emails this can be resourceful for your VPS and demanding how many email accounts you want them a better way is to have a email server hosted by someone else, not only because they tend to be more reliable but the fact is your being eating resources. As you know Google have a free email service called Gmail but they also do a Google APPS service which is exactly the same as Gmail but you use your own domain with their service. You don't need to use the web login to read emails as the same as the standard accounts you can throw them into outlook if you choose. Google apps is free upto 10 users, and then you need to start paying - it'll say free trial when you head over too www.google.com/apps ignore this if your below 10 users its actually free for standard use.

Below is a picture of what you need to do with the DNS with GoDaddy to send emails and receive though your server.

GoDaddy and Google APPS MX Records http://www.bybe.net/downloads/mx-records-google-apps.jpg

To send emails from the website you can use a PHP SMTP method or you can use a standard method by just using sendmail (Apt-get install sendmail) which won't login to your Google apps and send the email as SPOOFED which most people use. But SMTP avoids spam filters better.

Optional - Setting up a FQDN

Should at any stage you be asked to enter the a valid FQDN you should add it to prevent further issues. Since you have not mentioned what the VPS is running on I’ll give you a few pages that will help on multiple distros and assuming that your using linux. You want to add the FQDN to your hosts via the /etc/hosts file. References below.

  1. https://askubuntu.com/questions/158957/how-to-set-the-fully-qualified-domain-name-in-12-04
  2. https://serverfault.com/questions/367492/how-is-the-fqdn-determined
  3. https://serverfault.com/questions/331936/setting-the-hostname-fqdn-or-short-name
  • Thanks bybe. Are you sure google APPS are free for users < 10 ? It keeps reminding me that I have X days until my trial is over... – Vendetta Jan 23 '13 at 5:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.