doutou7286 2014-05-23 05:56
浏览 63
已采纳

如何在具有多个域的godaddy共享服务器中创建robot.txt

Good afternoon, I hope you can help me, I have a question:

I have a server with godaddy (delux-sharing), on this server I have the following:

/
--/mail
--/etc
--/public_html
----/web1
----/web2
------/index.php
------/css
------/img
------/js
----/web3
--/tmp

I am creating a robot.txt file in which I want NO indexing anything in web2, refieron me with nothing to everything (index.html, css, img, js), but YES want to index the other pages (web1, web3) how can I accomplish this? robot.txt file in that folder have to go? in /, /public_html, /web2?

I could help with the file contents: robot.txt?

Thank you very much in advance.

  • 写回答

2条回答 默认 最新

  • duanao2585 2014-05-23 06:05
    关注

    You'll use two different robots.txt files. One goes into /web1 and the other goes into /web2. As far as crawlers go, if /web1 is the root of 'somedomain.com' they will not be able to crawl up a folder and on to the /web2 folder (or any other folder on the same level).

    Edit: Some sample robots.txt files

    To exclude all robots from the entire server (where "server" == "domain")

    User-agent: *
    Disallow: /
    

    To allow all robots complete access

    User-agent: *
    Disallow:
    

    (or just create an empty "/robots.txt" file, or don't use one at all)

    To exclude all robots from part of the server

    User-agent: *
    Disallow: /cgi-bin/
    Disallow: /tmp/
    Disallow: /junk/
    

    To exclude a single robot

    User-agent: BadBot
    Disallow: /
    

    To allow a single robot

    User-agent: Google
    Disallow:
    
    User-agent: *
    Disallow: /
    

    So, /web2 would get a robots.txt file with:

    User-agent: *
    Disallow: /
    

    and /web1 and /web3 would get empty robot.txt files or

    User-agent: *
    Disallow:
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 matlab数字图像处理频率域滤波
  • ¥15 在abaqus做了二维正交切削模型,给刀具添加了超声振动条件后输出切削力为什么比普通切削增大这么多
  • ¥15 ELGamal和paillier计算效率谁快?
  • ¥15 file converter 转换格式失败 报错 Error marking filters as finished,如何解决?
  • ¥15 ubuntu系统下挂载磁盘上执行./提示权限不够
  • ¥15 Arcgis相交分析无法绘制一个或多个图形
  • ¥15 关于#r语言#的问题:差异分析前数据准备,报错Error in data[, sampleName1] : subscript out of bounds请问怎么解决呀以下是全部代码:
  • ¥15 seatunnel-web使用SQL组件时候后台报错,无法找到表格
  • ¥15 fpga自动售货机数码管(相关搜索:数字时钟)
  • ¥15 用前端向数据库插入数据,通过debug发现数据能走到后端,但是放行之后就会提示错误