How do I disable the $ {appName} .elasticbeanstalk.com url?

Here's my script:

  • I have an Amazon EB app
  • I am using 3rd party DNS / cache / attack protection (Cloudflare) instead of Route 53

Problem : Search engines (also) crawl and index my url {appName} .elasticbeanstalk.com

Q : how do I disable the $ {appName} .elasticbeanstalk.com url to only use my chosen name (.com)?

+3


source to share


2 answers


I will answer the best I have found so far to make sure I can help other people.

Assuming it is not possible to completely disable the elastic layer url, your best bet was to add an entry in your .htaccess file redirection.



# Redirect elastic beanstalk addresses to www.example.com
RewriteCond %{HTTP_HOST} elasticbeanstalk\.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

      

You can do something better to consider your test environments as well.

0


source


Could you set a rule on your server to instruct search engines not to crawl that particular url (robots.txt, etc.)?



0


source







All Articles