I need help with setting up custom link redirection for multiple source domains and subdomains to various target domains and subdomains based on some rule engine using AWS services.
Requirements:
- Source Domains/Subdomains: I have several domains and subdomains (e.g., example.com, sub.example.com).
- Target Domains/Subdomains: Users visiting the source domains/subdomains should be redirected to specific target domains/subdomains (e.g., newexample.com, sub.newexample.com).
- Rules
Example:
- example.com should redirect to newexample.com if customer has better performance there e.t.c otherwise to new2example.com.
- blog.example.com should redirect to blog.newexample.com for 25% and blog2.newexample.com for 75%.
Constraints:
Preferably, the solution should be scalable and cost-effective.
SSL/TLS support for secure redirection.
Minimal latency in the redirection process.
Questions:
- What is the best AWS service or combination of services for setting up these redirections?
- How do I configure the chosen service(s) to handle redirection from multiple source domains/subdomains to their respective target domains/subdomains?
- Are there any best practices or potential pitfalls I should be aware of when implementing this solution?
Any detailed guidance, examples, or references to relevant documentation would be greatly appreciated!
What I Have Tried:
I have looked into using:
Amazon Route 53: For DNS management.
Amazon S3: Static website hosting with redirection rules.
Amazon CloudFront: For CDN and edge redirection.
Amazon Amplify, Amazon Lambda
Amazon API Gateway
However, I am not entirely sure how to configure these services to achieve the desired redirection.