0

I have bought my domain from GoDaddy and I want to host the website on Amazon AWS. I have already setup my AWS hosting account and have updated the NS records on GDdaddy to point to AWS using Route 53.

Everything is working fine, the domain is picking up AWS hosting data. Now I want to mask a subdomain subdomain.abc.com to subdomain.xyz.com. In Route 53, I can easily forward the subdomain but I can't find any information on how to mask the said domain.

Update: I am able to redirect subdomain.abc.com to subdomain.xyz.com but the URL also changes to subdomain.xyz.com. How can I redirect the subdomain while keeping the URL in address bar same? Hope this is more clear.

  • I have attempted to answer your question, below. It is possible, that you already understand this process, and this is what you mean, above, when you say "I can easily forward the subdomain." Unfortunately, "forwarding" is a vague term that sometimes means "redirect" and sometimes means something different, so I've assumed, below that "redirect" -- where the browser's address bar actually changes -- is something you can use. If I have misunderstood your needs, I'll be happy to withdraw the answer. – Michael - sqlbot Mar 27 '16 at 13:14
  • @Michael-sqlbot please check my updated question. – Rohan Kandwal Mar 28 '16 at 4:53
  • Yes, but this is a sketchy and dubious practice, relying on stupid browser tricks like JavaScript or frames to defeat correct behavior of modifying the address bar to show the actual address of the content. Web content should appear at a single canonical URL; alternate URLs should be redirects. – Michael - sqlbot Mar 29 '16 at 9:52
  • @Michael-sqlbot - You are correct and I understand the downsides of masking but it's something that I can't say no to. I have to mask it for some reasons. Is it possible in Route 53? – Rohan Kandwal Mar 29 '16 at 10:25
2

Masking, no.

Redirecting, yes, with help from S3.

You can create an empty S3 bucket named abc.example.com, configured to redirect all requests to another host, xyz.example.org. Configure an A record in Route 53 for abc.example.com, set "Alias" to "Yes," and select the abc.example.com bucket from the drop-down list of alias targets.

Note that the bucket name of the empty bucket you create must exactly match The original hostname.

https://aws.amazon.com/blogs/aws/root-domain-website-hosting-for-amazon-s3/ explains how configure example.com to redirect to www.example.com but this can also be done across domains, using exactly the same steps.

The target domain does not have to be in Route 53 or even in AWS at all -- only the original domain (the one you want to redirect).

  • Did you get a change to look at the updated question? – Rohan Kandwal Mar 29 '16 at 7:29

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.