如题:想屏蔽搜索引擎不被它收录,反代后的域名如何添加robots.txt?
如果你使用了前端代理的话,拿nginx来说(我只会nginx,不会apache), 直接加一个location即可
nginx
apache
location
location /robots.txt { alias /opt/cloudrevedir/robots.txt; }
另外的方案,你看下能不能直接将robots.txt 镶嵌到静态资源里面去
robots.txt