Can I use Route 53 with Amazon AWS to mask a subdomain?

6,004

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).

Share:
6,004

Related videos on Youtube

Rohan Kandwal
Author by

Rohan Kandwal

Updated on September 18, 2022

Comments

  • Rohan Kandwal
    Rohan Kandwal almost 2 years

    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.

    • Michael - sqlbot
      Michael - sqlbot over 8 years
      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.
    • Rohan Kandwal
      Rohan Kandwal about 8 years
      @Michael-sqlbot please check my updated question.
    • Michael - sqlbot
      Michael - sqlbot about 8 years
      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.
    • Rohan Kandwal
      Rohan Kandwal about 8 years
      @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
    Rohan Kandwal about 8 years
    Did you get a change to look at the updated question?