On apache server I set up a domain.com and a subdomain media.domain.com. I need the media subdomain to serve exact same files. I added inside sites-available/domain.com following
<VirtualHost *:80>
VirtualDocumentRoot /data/web/domain.com
ServerName domain.com
ServerAlias media.domain.com
</VirtualHost>
My question is how to prevent the subdomain from beeing crawled and considered as duplicate? Should I allow access only to files folder? Or what is the best practice in my case? My aim is to only serve files like images from subdomain. Thank you.