Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've bought a domainname and pointed it to my amazon EC2 instance (example: ec2-XXX-XXX-XXX-XXX.us-west-1.compute.amazonaws.com), and it works, but when I go to www.example.com, the long amazon public dns adress shows upp in the url field. Is there a way to make it stay www.example.com?

share|improve this question
add comment

2 Answers

When you say "pointed it to", it sounds like you have used a URL forwarding mechanism rather than proper DNS hosting.

To do this right, you will need to have somebody do DNS hosting for you, probably the same company that you registered your domain through. You will configure the name servers on your domain to point to them, then using their DNS configuration settings, configure the address of your EC2 instance as the registered host for service on that domain.

Lastly, you should change the host name in apache or whatever web server software you are using so that it understands what domain name it is supposed to be accepting traffic for.

share|improve this answer
1  
Thanks alot for your reply. I did ask the support for the company I bought the domain from to "point the domainname to ..." and they did. You mean I should ask them for DNS-hosting aswell ? It sounds a bit complicated, do you know of any resources on the matter that I could read to get a better understanding ? Thanks alot. –  Emil Feb 24 '11 at 10:37
1  
It's not clear what they did and since we don't have your domain name I can't say more than a guess based on your info, but in order for the registrar to "point" your domain, they probably already hosted the DNS themselves, brought the domain up on their servers, then setup a redirect so that any traffic that ends up there gets bounced off to your other address. However it's also possible that they already setup DNS properly, and you haven't configured apache to accept it. You can figure out which they did by pinging your domain. See if the IP is your EC2 instance or some server of theirs. –  Caleb Feb 24 '11 at 12:46
    
I think configuring apache tomcat is what I must do, since I haven't touched that really. Is this a fitting resource? geonetwork.tv/domain sent you the domainname via PM, should you be interested to check it out. –  Emil Feb 24 '11 at 13:48
    
Actually you're not quite to the apache stage yet. I looked at the domain you sent me via PM and it is resolving to an address owned by the registrar you used. You need to get your registrar to stop hosting the domain and forwarding it to you and reconfigure to allow YOU to host the domain. –  Caleb Feb 24 '11 at 14:36
    
I've now done that. Now, going to www.emil.se:8080/App goes to my homepage, while www.emil.se still doesn't show anyhting (just like going to ec2-XXX-XXX-XXX-XXX.us-west-1.compute.amazonaws.com wont do anything). I guess this is the part where the apache configuration comes in? –  Emil Feb 25 '11 at 11:46
show 1 more comment

Us the Amazon Elastic IP service to get a static IP address for your EC2 instance. Then have your domain registrar point your domain to the static IP. If you don't use the Elastic IP service you have no guarantee of keeping the same IP address when you reboot your server for maintenance.

share|improve this answer
    
Thanks! This leads me to the next stage, configuring Apache. –  Emil Feb 25 '11 at 11:43
    
+1 Thanks, very helpful. –  Anthony Aug 19 '13 at 11:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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