We maintain links to the documents coming from the following 3 sources.
1. docs.abc.com
2. docs.def.com
3. docs.ghi.com
But we do not give a direct link to the user. So we give the links to the documents, like the following.
docs.mysite.com/abc/other-link-info
docs.mysite.com/def/other-link-info
docs.mysite.com/ghi/other-link-info
So when user's browser tries to access the link, browser hits our site docs.mysite.com and we have two approaches on how to serve the documents.
Approach 1: For each link, we will compute the actual link (source link) of the document and download the document from the source link. We will then stream the document to user.
The downside of this approach is that there is a load and bandwidth usage on the server.
Approach 2: Create 3 CNAME aliases, the following way so that the documents are served automatically.
docs.mysite.com/abc => docs.abc.com
docs.mysite.com/def => docs.def.com
docs.mysite.com/ghi => docs.ghi.com
The advantage is that there is no load and bandwidth usage on the server. But I am not sure whether this approach is possible.
One side question: If we create a CNAME alias like docs.xyz.com pointing to mybucket.s3.amazonaws.com, does the end user gets to know the source link or where we stored our documents. We do not want the end user know where we stored the documents, and a lot of times those documents are not ours.
Another side question: If we have a CNAME alias like docs.xyz.com pointing to mybucket.s3.amazonaws.com, can we MX records and other records on xyz.com domain?
Thank you very much for taking time to read this.