Showing posts with label AWS Pre-Route 53. Show all posts
Showing posts with label AWS Pre-Route 53. Show all posts

Friday, March 24, 2023

steps to AWS - Redirect traffic from domain name to ELB using Route 53.

 steps to redirect traffic from a domain name to an Elastic Load Balancer (ELB) using Route 53 in AWS:

  1. Log in to your AWS Management Console.
  2. Navigate to the Route 53 Dashboard.
  3. Select "Hosted zones" from the sidebar menu.
  4. Choose the domain name you want to redirect traffic for.
  5. Click on "Create Record Set".
  6. Choose "Alias" for the record type.
  7. Choose the appropriate ELB from the drop-down list under "Alias Target".
  8. Click on "Create".
  9. Review the changes and click on "Create Record Set".
  10. Test the configuration by visiting the domain name in a web browser.

Once you've completed these steps, traffic to the domain name will be automatically redirected to the ELB. You can use the AWS Management Console to monitor and modify your Route 53 settings as needed. Additionally, you can use features like health checks to ensure that your ELB is properly routing traffic to your instances.

AWS Pre-Route 53 – how DNS works

 Before diving into AWS Route 53, it's important to understand how DNS works in general.

DNS (Domain Name System) is a system that translates human-readable domain names (such as www.example.com) into IP addresses that computers can understand.

When you enter a domain name in your web browser, your computer contacts a DNS resolver to get the IP address associated with that domain name.

The DNS resolver then returns the IP address to your computer, which can then connect to the web server associated with that IP address.

Here are the general steps that occur when a DNS lookup is performed:

  1. Recursive DNS resolver: Your computer sends a request to a recursive DNS resolver (often provided by your Internet Service Provider). The request includes the domain name that you want to look up.

  2. Root name servers: If the recursive DNS resolver doesn't have the IP address associated with the domain name in its cache, it contacts one of the 13 root name servers. These root name servers contain information about the top-level domain names (such as .com, .org, etc.) and can direct the request to the appropriate authoritative name server.

  3. Authoritative name server: The authoritative name server is responsible for storing the IP address associated with the domain name. If the authoritative name server has the IP address in its cache, it returns the IP address to the recursive DNS resolver. Otherwise, it contacts other authoritative name servers until it finds the IP address.

  4. Recursive DNS resolver: Once the recursive DNS resolver has the IP address, it returns the IP address to your computer, which can then connect to the web server associated with that IP address.

AWS Route 53 is a DNS service provided by Amazon Web Services that allows you to manage DNS records for your domain names.

With Route 53, you can create and manage DNS records, such as A records (which map a domain name to an IP address) and CNAME records (which map a domain name to another domain name).

In addition to managing DNS records, Route 53 also provides other features, such as traffic routing and health checks.

With traffic routing, you can configure Route 53 to route traffic to different endpoints based on geographic location, latency, or other criteria. With health checks, you can monitor the health of your resources (such as EC2 instances) and automatically route traffic away from unhealthy resources.

Overall, AWS Route 53 is a powerful tool for managing DNS for your domain names and routing traffic to your resources.