久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      wordpress多站點的robots怎么弄

      wordpress多站點的robots怎么弄

        稍微接觸過SEO的站長朋友都應(yīng)該知道 robots協(xié)議(也稱為爬蟲協(xié)議、爬蟲規(guī)則、機器人協(xié)議等),也就是通常添加到網(wǎng)站根目錄的robots.txt 文件,它的作用在于告訴搜索引擎哪些頁面可以抓取,哪些頁面不能抓取,從而優(yōu)化網(wǎng)站的收錄結(jié)果和權(quán)重。

      推薦教程:wordpress教程

        如果你的網(wǎng)站根目錄還沒有 robots.txt,你可以創(chuàng)建一個,具體的寫法請參考 百度百科。下面是一個基本的 WordPress robots協(xié)議:

      User-agent: * Disallow: /feed/ Disallow: /trackback/ Disallow: /wp-admin/ Disallow: /wp-content/ Disallow: /wp-includes/ Disallow: /xmlrpc.php Disallow: /wp- Allow: /wp-content/uploads/ Sitemap: http://example.com/sitemap.xml

        下面主要介紹一下 WordPress 自動創(chuàng)建虛擬 robots.txt 功能。如果你的網(wǎng)站根目錄不存在真實的 robots.txt,那么可以讓 WordPress 自動創(chuàng)建一個虛擬的 robots.txt (該文件不會真實存在,但是訪問 http://域名/robots.txt 時可以正常顯示)

        將下面的代碼添加到主題的 functions.php 即可:

      /**  * 為你的 WordPress 站點添加 robots.txt  * https://www.wpdaxue.com/add-robots-txt.html  */add_filter( 'robots_txt', 'robots_mod', 10, 2 );function robots_mod( $output, $public ) { 	$output .= "Disallow: /user/"; // 禁止收錄鏈接中包含 /user/ 的頁面 	return $output;}

        注:如果你想添加

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號