I have a Linux server (Ubuntu 12.04) I'm using to learn as much as I can about server management. I've got as far as getting a full LAMP setup running, but have hit a dead end trying to get a domain name to point to my server.

I've set up a virtual host in an Apache .conf file, and set up the IP address in the hosts file with the domain name, and have pointed the A record to the IP address with no luck. I've also installed bind9, but thought I'd see if I'm going in the wrong direction rather than messing anything up with that.

What is the best way to get a domain name up and running - ideally in a way that would be production ready rather than a temporary setup

EDIT: Thanks for the tips - just to better inform the situation - I have a few spare domain names registered that I can use, and I'm renting a VPS to play with. Currently I have the DNS * and @ A record pointing to the IP, but the nameservers are with the registrar if that makes a difference?

  • Have you registered a domain? Have you set the DNS for the domain via the registrar? – Thomas Ward Mar 19 '13 at 19:13
  • 1
    You may want to check your user agreement with your ISP too, I know mine for one doesn't like it when you host websites, and will shut you off if they catch you... What are the odds of being caught? I don't know... – TheXed Mar 19 '13 at 19:14
  • added a little more info about the setup – PaulK Mar 19 '13 at 19:20
  • Do you have a working DNS server that correctly returns the domain pointing at your VPS' IP? Specifically on THAT DNS server. – Thomas Ward Mar 19 '13 at 19:24
  • Also, who's your registrar – Thomas Ward Mar 19 '13 at 19:30

You should start by seeing if you can change your domain's DNS in their control panel. If you can, then you shoud set the domain to use an A record to point to the IP address for your VPS you're running stuff on. Once you do that, wait 24 hours and check to see if the domain correctly points to your server.

  • Thanks - it's not quite been 24 hours since I changed it so I'll try tomorrow and update here – PaulK Mar 19 '13 at 19:39
  • Yeah, give it 24 hours, 48 at most so DNS propagates world-wide. – Thomas Ward Mar 19 '13 at 19:40
  • Quick update: DNS seems to have propagated now but VirtualHost in .conf file was ignored. Instead I set up the VirtualHost in /sites-available/mysite.com and then ran a2ensite mysite.com - working beautifully now – PaulK Mar 19 '13 at 23:20
  • So, all's good? – Thomas Ward Mar 20 '13 at 2:20

You don't need to install bind9 or manage your own DNS server for your purpose, that would make things more complex.

I suggest to setup an account on http://freedns.afraid.org and use their DNS servers. I have an Ubuntu server and two domain names pointing to it this way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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