diff --git a/moto/route53/responses.py b/moto/route53/responses.py index 0e171a52c..429317dae 100644 --- a/moto/route53/responses.py +++ b/moto/route53/responses.py @@ -21,8 +21,15 @@ def list_or_create_hostzone_response(request, full_url, headers): else: comment = None private_zone = False + + + name = elements["CreateHostedZoneRequest"]["Name"] + + if name[-1] != ".": + name += "." + new_zone = route53_backend.create_hosted_zone( - elements["CreateHostedZoneRequest"]["Name"], + name, comment=comment, private_zone=private_zone, ) @@ -247,7 +254,7 @@ LIST_HOSTED_ZONES_RESPONSE = """