If you want to access your servers by example.com
instead of the name they generate, you will have to configure your own DNS server.
By default, AWS VPC manages DHCP for you and comes with Amazon's DNS Server.
You can read the options at your disposal to resolve the issue:
domain-name-servers
The IP addresses of up to four domain name servers, or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. If you specify more than one domain name server, separate them with commas.
domain-name
If you're using AmazonProvidedDNS in us-east-1, specify ec2.internal. If you are using AmazonProvidedDNS in another region, specify region.compute.internal (for example, ap-northeast-1.compute.internal). Otherwise, specify a domain name (for example, MyCompany.com).
Important
Some Linux operating systems accept multiple domain names separated by spaces. However, other Linux operating systems and Windows treat the value as a single domain, which results in unexpected behavior. If your DHCP options set is associated with a VPC that has instances with multiple operating systems, specify only one domain name.
Free translation:
domain-name-servers
The IP addresses of up to four domain name servers, or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. If you specify server more than one domain name, separate them with commas.
domain-name
If you are using AmazonProvidedDNS in us-east-1, specify ec2.internal. If you are using AmazonProvidedDNS in another region, specify region.compute.internal (for example, ap-northeast-1.compute.internal). If not, specify a domain name (for example, MyCompany.com).
Important
Some Linux operating systems accept multiple domain names separated by spaces. However, other Linux and Windows operating systems treat the value as a single domain, which results in unexpected behavior. If your defined DHCP options are associated with a VPC that has cases with multiple operating systems, specify only one domain name.
Alternative
Since you can not change without implementing your own DNS servers, you can easily refer to it with another name by creating a CNAME
registry, which will have the desired effect.
For this purpose, in the DNS zones of the site yesterday you have your example.com
, you add a CNAME
registry type:
meuNovoNovo IN CNAME meuNomeAntigo.
In this way, when you access meuNovoNovo
, the server where it is registered will indicate that it should look for the information in meuNomeAntigo
.