2016-10-27 5 views
0

robot.txtファイルで許可しても、Google botは私のcssとjsを読むことができません。 サイトはWordpressで構築されています。 以下は私のrobot.txtファイルです。Robot.txtを許可してもGoogle Botが自分のcssとjsを読み取れません

User-agent: * 
Allow:/
Disallow: /wp-admin/ 
Disallow: /timeclock/ 
Disallow: /staging/ 

User-agent: Mediapartners-Google* 
Allow:/

User-agent: Googlebot-Image 
Allow: /wp-content/uploads/ 
Allow: /*.css$ 

User-agent: Adsbot-Google 
Allow:/
Allow: /*.css$ 

User-agent: Googlebot-Mobile 
Allow:/
Allow: /*.css$ 

User-agent: Googlebot 
Allow:/
Allow: /* .js* 
Allow: /* .css* 
+0

私はあなたが 'Allow:/ * .js *' 'を使う必要はないと思う*/* .css *' * 'Allow:/ .css *' このコマンドを書いてください*通常はノートを/ *で閉じる*/ あなたは削除しなければならないことが分かります。 –

答えて

0

私はコメントに書いていますが、あなたはunseを必要としません/ *これはメモを追加し、/ *で閉じることができます。

User-agent: * 
Allow:/
Disallow: /wp-admin/ 
Disallow: /timeclock/ 
Disallow: /staging/ 

User-agent: Mediapartners-Google* 
Allow:/

User-agent: Googlebot-Image 
Allow: /wp-content/uploads/ 
Allow: /.css$ 

User-agent: Adsbot-Google 
Allow:/
Allow: /.css$ 

User-agent: Googlebot-Mobile 
Allow:/
Allow: /.css$ 

User-agent: Googlebot 
Allow:/
Allow: /.js 
Allow: /.css 
+0

お時間をありがとう。しかし、まだ動作していません。 –

+0

しかし、なぜあなたはCSSを読むgoogleをしたいですか?あなたがいくつかのコンテンツをGoogleの内部にhtmlから読んでいる場合。 –

関連する問題