AWS Lightsail - IPv4 Public DNS

0

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?

Danilo
demandé il y a 2 mois123 vues
1 réponse
0

Hello.

Looking at the document below, it seems that if you return "X-Robots-Tag: noindex" in the response header, it will not be indexed.
In other words, I thought it would be a good idea to add a process on the application side that would return "X-Robots-Tag: noindex" in the response header when accessed from a domain other than the domain.
https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag

Or, how about configuring the web server (Apache, etc.) to block access from users other than the domain?

<VirtualHost *:443>
    ServerName howtoabroad.com
    DocumentRoot /var/www/html

    SSLEngine on
    SSLCertificateFile /path/to/your/certificate.crt
    SSLCertificateKeyFile /path/to/your/private.key
    SSLCertificateChainFile /path/to/your/chainfile.pem

    <Directory "/var/www/html">

        RewriteEngine on
        RewriteCond %{HTTP_HOST} !^domain\.com$
        RewriteRule ^.*$ - [F,L]
    </Directory>
</VirtualHost>
profile picture
EXPERT
répondu il y a 2 mois
profile picture
EXPERT
vérifié il y a 2 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions