What are Hosted Zones in Route 53?

What are Hosted Zones in Route 53?

A Hosted Zone in Amazon Route 53 is a container for DNS records that define how traffic is routed for a specific domain (e.g., example.com) or subdomain (e.g., app.example.com). It acts as the starting point for managing DNS settings for a domain within AWS.

Each hosted zone is associated with a single domain name and contains the DNS records needed to route traffic to the appropriate resources, such as Amazon EC2 instances, load balancers, or external servers.

Types of Hosted Zones :
  1. Public Hosted Zones:

    • Used to manage DNS records for a public domain that is accessible on the internet.
    • Example: Configuring DNS records for www.example.com to point to an Elastic Load Balancer (ELB) or an S3 bucket.
  2. Private Hosted Zones:

    • Used to manage DNS records for domains within an Amazon Virtual Private Cloud (VPC).
    • These records are not publicly accessible and are intended for internal use within a VPC.
    • Example: Configuring internal DNS names like internal.example.local for private EC2 instances within a VPC.
How Hosted Zones Work :
  1. Domain Registration:

    • You can either register a domain name with Route 53 or transfer an existing domain from another registrar to Route 53.
    • Once registered, a hosted zone is automatically created for that domain.
  2. Nameservers:

    • Each hosted zone is assigned a set of Route 53 nameservers (NS records).
    • These nameservers must be updated at your domain registrar (if it's external) to direct DNS queries to Route 53.
  3. DNS Records:

    • Within a hosted zone, you define DNS records (e.g., A, CNAME, MX, TXT) to specify how traffic should be routed.
    • Example DNS records:
      • A Record: Maps example.com to an IP address.
      • CNAME Record: Maps www.example.com to example.com.
  4. Routing Traffic:

    • Route 53 uses the hosted zone and its records to route user requests to the correct endpoints (e.g., an EC2 instance, S3 bucket, or external server).