0

I have two hosting services. One is already in use and has domain example.com. It also has a sub-domain called order.example.com.

Second hosting service is under Amazon (EC2).

How can I use order.example.com sub-domain in Amazon virtual hosting service?

So when user goes to the example.com website and clicks the order.example.com link it redirects to Amazon server, but keeps the url as it is.

I want it to feel like that user hasn't redirected anywhere from example.com. Can I assign same domains to multiple servers?

  • You need to know the ip address of your amazon hosting, then set the DNS of domain.example.com with A record to point to the ip address. Then on the amazon hosting, add a domain, and choose order.example.com. Given that I don't have an amazon hosting, I don't know the exact screens, and that's why this is a comment, not an answer. – LPChip May 9 '18 at 11:49
  • @LPChip Okay, ill try that! – Jaakko Uusitalo May 9 '18 at 11:55
1

I want it to feel like that user hasn't redirected anywhere from example.com. Can I assign same domains to multiple servers?

But it's not the same domain. The subdomain is completely independent in terms of where it points (and doesn't inherit anything from its parent domain).

So the answer is yes, you can do that, and you do not need to do anything special – besides actually creating the subdomain in DNS (with a standard A/AAAA or CNAME record).

(I don't know how EC2 works, but generally use A/AAAA if the EC2 server has a completely static IP address, or CNAME if Amazon gives you a special hostname to alias to, like many CDNs do.)

  • I want to vote this up, but I'm stopped in my tracks. I feel like this answer is incomplete, even though it is correct for what is already written. – LPChip May 9 '18 at 12:06
  • I usually focus on why the question had to be asked in the first place... meanwhile feel free to write the other half in your own post. – grawity May 9 '18 at 12:10
  • Your edit seems much better. +1 – LPChip May 9 '18 at 12:14
  • I created New Record A with Amazon public ip from example.com control panel. – Jaakko Uusitalo May 9 '18 at 12:14

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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