Skip to content

DNS forwarder externally

0

Need to forward DNS to an external host. So when accessing www.example1.com which has a hosted zone in AWS route 53, it can be redirected to www.example2.com which is hosted outside AWS.

I understand I can do forwarding with the below URL but that is if both domains are part of AWS - any input please?

https://repost.aws/knowledge-center/redirect-domain-route-53

Thanks.

asked 2 years ago412 views

2 Answers
3

Hello there,

Reviewing your use case you need Redirection of one domain to other. You can use Amazon Route 53 with other services, such as Amazon Simple Storage Service (Amazon S3), Amazon CloudFront, or Application Load Balancer, for domain redirection.

There are couple of ways this could be done.

  1. Domain redirection using Amazon S3 and Amazon CloudFront [1] [2].
  2. Domain redirection using Application Load Balancer [3].
  3. Domain redirection using an Amazon CloudFront Function [4].
  4. If you are hosting your first domain on the webserver, you can follow webservers redirection procedures as well (Check above response for Apache redirection).

References

  1. https://repost.aws/knowledge-center/redirect-domain-route-53
  2. https://repost.aws/knowledge-center/cloudfront-https-requests-s3
  3. https://repost.aws/knowledge-center/elb-redirect-to-another-domain-with-alb
  4. https://repost.aws/knowledge-center/cloudfront-redirect-domain
AWS

answered 2 years ago

EXPERT

reviewed 2 years ago

EXPERT

reviewed 2 years ago

  • For the basic use case described, I'd strongly recommend looking at an ALB (Application Load Balancer) in your reference #3 as the primary option. A single ALB can handle dozens of different domain names, each with different redirect targets, it integrates with ACM (AWS Certificate Manager) for free TLS certificates, requires minimal setup and management effort, and is easy for beginners and advanced users alike to run without costs getting out of control. The other alternatives are capable of more advanced tricks but take more to learn to use properly and cost-efficiently.

0

Hello,

If I understand your question correctly, then you want to redirect www.example1.com to www.example2.com. This is not a DNS question, but rather a web server one. The DNS server will always resolve to the A record created in the zone. What happens after that is the web server's responsibility.

If you are using Apache web server, then you can use this guide to configure redirects.

Hope this helps.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.