AWS in 1 Min · Episode 55

Route 53 hosted zones: public vs private

Public vs private DNS. Watch the one-minute video, then read the details.

David Gomez1:22 video · 3 min read

"DNS records are always public." Not in a private zone. Amazon Route 53 can publish names for the whole internet, and it can also keep names that resolve only inside your own network. The difference is the type of hosted zone you put the records in, and choosing the wrong one either exposes internal names or leaves your servers unable to find each other.

What a hosted zone is

A hosted zone is a container for the DNS records of one domain and its subdomains. The zone for example.com holds records such as www.example.com and api.example.com, each saying where that name should point.

Route 53 has two kinds, and you choose when you create the zone.

Public hosted zones

A public hosted zone tells Route 53 how to answer queries that come from the internet. This is how customers find your website, your API and your mail servers.

  • Anyone in the world can look these records up. Treat every name in a public zone as public information.
  • For the zone to be used, the domain's registration must point at the name servers Route 53 assigned to it.

Private hosted zones

A private hosted zone answers only queries that come from the VPCs you associate with it. From outside those VPCs, the records are not returned.

That makes it the right place for internal names:

  • db.corp.internal for a database
  • orders.corp.internal for an internal service
  • anything your applications call that the public has no reason to know about

Applications then use a stable name instead of a hard-coded IP address. When the database moves, you change one record, not twenty configuration files.

Things worth knowing:

  • One private zone can be associated with many VPCs, including VPCs in other AWS accounts (that takes an authorization step).
  • The VPC must have DNS support and DNS hostnames turned on (enableDnsSupport and enableDnsHostnames). If they're off, private names don't resolve. This is the classic cause of "the record exists but nothing can find it."
  • Your office or data centre can't see a private zone by default. To resolve those names from on premises, use Route 53 Resolver inbound endpoints over your VPN or Direct Connect link.

Split-horizon DNS

You can create a public and a private hosted zone with the same domain name. Inside the associated VPCs, Route 53 answers from the private zone; everyone else gets the public one. AWS calls this split-view DNS, and it's widely known as split-horizon.

A typical use: app.example.com resolves to a private address for employees' workloads inside the VPC and to the public load balancer for customers.

The common mistake: once a private zone exists for example.com, the VPC uses it for every name in that domain. If a record exists only in the public zone, workloads inside the VPC won't find it. Put every record the VPC needs in the private zone as well.

Where AI fits

AI workloads are full of internal services: a model server on GPU instances, a vector database, a retrieval API. Give each one a private name, such as llm.corp.internal, so applications can find them without those names ever appearing in public DNS.

The same idea applies to AWS's own AI services. When you create an interface VPC endpoint (AWS PrivateLink) for Amazon Bedrock and enable private DNS, the normal Bedrock runtime hostname resolves to private IP addresses inside your VPC. Your code doesn't change, and the requests stay off the public internet.

Quick recap

  • A hosted zone holds the DNS records for one domain.
  • Public zones answer the internet; private zones answer only the VPCs you associate.
  • Split-horizon: the same domain can have both, with different answers inside and outside.
  • Private zones need DNS support and DNS hostnames enabled on the VPC.
AWS in 1 Min #55 · 1:22

Need an AWS expert on your team?

I'm David, an AWS expert and fractional cloud consultant. I work alongside your team to run your cloud and infrastructure: architecture, security, cost and day-to-day operations. You get senior AWS experience when you need it, without the cost of a full-time hire.

  • Architecture reviews and a clear plan for what to fix first
  • Security hardening: IAM, networking, audits
  • Lower AWS bills without slowing your team down
  • Hands-on help with AI workloads on AWS