2 Answers
- Newest
- Most votes
- Most comments
0
Hi.
As of now that is how Route53 handles wildcards, it will route for the subdomain and all the subdomain of the subdomain. However, specific domain names take precedence, so you could create specific records for the domains you don't want to route to the ALB.
From documentation: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html
- The * must replace the entire label. For example, you can't specify *prod.example.com or prod*.example.com.
- Specific domain names take precedence. For example, if you create records for *.example.com and acme.example.com, Route 53 always responds to DNS queries for acme.example.com with the values in the acme.example.com record.
- The * applies to DNS queries for the subdomain level that includes the asterisk, and all the subdomains of that subdomain. For example, if you create a record named *.example.com, Route 53 uses the values in that record to respond to DNS queries for zenith.example.com, acme.zenith.example.com, and pinnacle.acme.zenith.example.com (if there are no records of any type for that hosted zone).
0
Hi.Wildcard DNS domains are typically used to handle requests for non-existent domains or subdomains, and while the method shown by JimmyDQV seems valid all FQDNs you do not want routed must be explicitly specified. If this is not acceptable, you should consider whether the use of wildcard DNS domains is appropriate in the first place.
Relevant content
- asked 2 years ago
- Accepted Answerasked 6 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 24 days ago
- AWS OFFICIALUpdated 2 months ago
Plus on your ALB rules you could use a rule for host-header to limit what domains you will route to a target