| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
You can create a large number of hosted zones for each AWS account, and you can list all of the hosted zones associated with
an account using either the Route 53 console or the ListHostedZones API action. You can also get the number of
resource record sets in each hosted zone.
Note
For information about how to get a list of the resource record sets in a hosted zone, see Listing Resource Record Sets.
See the applicable topic:
To list the hosted zones associated with an AWS account using the Route 53 console
Sign in to the AWS Management Console and open the Amazon Route 53 console at https://console.aws.amazon.com/route53/.
In the Route 53 console, the Hosted Zones page automatically displays a list of the hosted zones that are associated with the AWS account that you are currently signed in with.

You can use the ListHostedZones API action to list the hosted zones that are associated with an AWS account, as well as
the number of resource record sets in each hosted zone. For more information about the ListHostedZones API action, see
GET ListHostedZones in the Amazon Route 53 API Reference.
Note
For information about using the Route 53 API, see Making API Requests.
To get a list of your hosted zones and the number of resource record sets in each hosted zone, send a
GET ListHostedZones request to the 2012-12-12/hostedzone resource. See the following example.
The ListHostedZones action returns your list of hosted zones in an XML file that is contained in the body of an HTTP response.
Example Response
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<ListHostedZonesResponse xmlns="https://route53.amazonaws.com/
doc/2012-12-12/">
<HostedZones>
<HostedZone>
<Id>/hostedzone/Z2EUQ1WTGCTBG2</Id>
<Name>example2.com.</Name>
<CallerReference>mySecondZone</CallerReference>
<Config>
<Comment>This is my second hosted zone.</Comment>
</Config>
<ResourceRecordSetCount>17<ResourceRecordSetCount>
</HostedZone>
</HostedZones>
<MaxItems>1</MaxItems>
<IsTruncated>true</IsTruncated>
<NextMarker>Z2EUQ1WTGCTBG2</NextMarker>
</ListHostedZonesResponse>Each of your hosted zones is described by a HostedZone element that contains the domain name that is
associated with your hosted zone, a Route 53 identifier of your hosted zone, the comment that you specified
when you created the hosted zone, and the number of resource record sets in the hosted zone. If you don't specify a maxitems
parameter in the request, the XML file that Route 53 returns lists up to 100 hosted zones, all nested in a single
HostedZones element. If you have no hosted zones, the HostedZones element is empty.
If you have a lot of hosted zones, you can use the maxitems parameter to list them in groups of up to 100.
The response includes four values that help you navigate from one group of maxitems hosted zones to
the next:
MaxItems is the value that you specified for the maxitems parameter
in the request that produced the current response.
If IsTruncated is true, there are more hosted zones associated with the current
AWS account.
If IsTruncated is false, this response includes the last hosted zone
that is associated with the current account.
NextMarker is the hosted zone ID of the next hosted zone that is associated
with the current AWS account. If you want to list more hosted zones, make another call to ListHostedZones,
and specify the value of the NextMarker element in the marker parameter.
If IsTruncated is false, the NextMarker
element is omitted from the response.
If you're making the second or subsequent call to ListHostedZones, the Marker
element matches the value that you specified in the marker parameter in the previous request.
The following examples show how to use the MaxItems element to control the listing of hosted zones.
Example Request
In the following example, the maxitems parameter is 1, so the response will include a maximum of one hosted
zone.
GET /2012-12-12/hostedzone?maxitems=1Example Response
This example shows the response for the previous request.
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<ListHostedZonesResponse xmlns="https://route53.amazonaws.com/
doc/2012-12-12/">
<HostedZones>
<HostedZone>
<Id>/hostedzone/Z3AEGXETSR30VB</Id>
<Name>example2.com.</Name>
<CallerReference>MyUniqueIdentifier2</CallerReference>
<Config>
<Comment>This is my second hosted zone.</Comment>
</Config>
<ResourceRecordSetCount>42<ResourceRecordSetCount>
</HostedZone>
</HostedZones>
<MaxItems>1</MaxItems>
<IsTruncated>true</IsTruncated>
<NextMarker>Z2EUQ1WTGCTBG2</NextMarker>
</ListHostedZonesResponse>Example Follow-up Request
This example shows the follow-up request to the previous request. In this request, we specify Z2EUQ1WTGCTBG2 for the
marker parameter, which matches the value of the NextMarker element in the previous response.
Z2EUQ1WTGCTBG2 is the hosted zone ID of the next hosted zone that is associated with the current AWS user account.
In addition, in this request we specify a value of 10 for the maxitems parameter, so this call to
the ListHostedZones action will return up to 10 hosted zones, beginning with Z2EUQ1WTGCTBG2.
GET /2012-12-12/hostedzone?marker=Z2EUQ1WTGCTBG2&maxitems=10
Example Follow-up Response
This example shows the response for the previous example.
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<ListHostedZonesResponse xmlns="https://route53.amazonaws.com/
doc/2012-12-12/">
<HostedZones>
<HostedZone>
<Id>/hostedzone/Z2EUQ1WTGCTBG2</Id>
<Name>example3.com.</Name>
<CallerReference>MyUniqueIdentifier3</CallerReference>
<Config>
<Comment>This is my third hosted zone.</Comment>
</Config>
<ResourceRecordSetCount>117<ResourceRecordSetCount>
</HostedZone>
<HostedZone>
<Id>/hostedzone/Z2682N5HXP0BZ4</Id>
<Name>example.com.</Name>
<CallerReference>MyUniqueIdentifier4</CallerReference>
<Config>
<Comment>This is my fourth hosted zone.</Comment>
</Config>
<ResourceRecordSetCount>51<ResourceRecordSetCount>
</HostedZone>
</HostedZones>
<MaxItems>10</MaxItems>
<IsTruncated>false</IsTruncated>
</ListHostedZonesResponse>