AWS Lightsail - IPv4 Public DNS issue

59 Views Asked by At

Recently I found out the public IPv4 Public DNS domain from my Worpress in AWS Lightsail instance is public and indexed by Google.

This is becoming a huge problem because is around 4,000 urls already indexed and my main domain is around 20,000 and will start to lose relevancy.

Any ideas how to hide this from public? Redirect from https://ec2-1-234-56-789.compute-1.amazonaws.com/ to main domain ou something that's solve this problem?

1

There are 1 best solutions below

4
John Rotenstein On

From DNS attributes for your VPC - Amazon Virtual Private Cloud:

Public IPv4 DNS
A public (external) IPv4 DNS hostname takes the form ec2-public-ipv4-address.compute-1.amazonaws.com for the us-east-1 Region, and ec2-public-ipv4-address.region.compute.amazonaws.com for other Regions. The Amazon DNS server resolves a public DNS hostname to the public IPv4 address of the instance outside the network of the instance, and to the private IPv4 address of the instance from within the network of the instance.

You can disable DNS hostnames by going to the VPC and choosing Actions / Edit VPC settings, then disable the "Enable DNS hostnames" option:

[DNS hostnames