样式表在渲染后被Google阻止

时间:2015-02-21 11:49:33

标签: css magento stylesheet robots.txt

在Google Search Condole(Fetch as Google)中渲染我的网站时,我发现我的网站的样式表已被屏蔽。获取状态显示为“部分”。我怀疑这个原因导致我的网站没有出现在Google搜索结果中。

但是,将我的网站添加到Bing搜索引擎后,它会在一小时后显示在搜索结果中。因此,我的网站在Bing中没有遇到任何索引问题。

如何允许Googlebot访问我网站的CSS文件?

我正在使用Magento网站。以下是Search Console中的提取详细信息:

http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/css/styles.css3.php?url=http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/    Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/css/bootstrap.css Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/css/bootstrap-theme.css   Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/css/font-awesome.css  Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/css/font-awesome.min.css  Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/css/styles.css    Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/base/default/css/widgets.css Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/magentothem/fancybox/jquery.fancybox.css  Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/magentothem/ajaxcartsuper/ajax_cart_super.css Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/magentothem/css/categorytabsliders.css    Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/magentothem/css/custommenu.css    Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/magentothem/imagerotator/effect.css   Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/layerednavigationajax/jquery-ui.css   Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/magentothem/css/ma.upsellslider.css   Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/magentothem/css/ma.verticalmenu.css   Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/magentothem/css/ma.banner7.css    Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/magentothem/css/ma.brandslider.css    Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/css/print.css Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/images/logo.png   Image   Blocked robots.txt Tester

这是我的robots.txt

# Google Image Crawler Setup
User-agent: Googlebot-Image
Disallow:

# Crawlers Setup

# Directories
Disallow: /404/
Disallow: /app/
Disallow: /cgi-bin/
Disallow: /downloader/
Disallow: /errors/
Disallow: /includes/
#Disallow: /js/
#Disallow: /lib/
Disallow: /magento/
#Disallow: /media/
Disallow: /pkginfo/
Disallow: /report/
Disallow: /scripts/
Disallow: /shell/
Disallow: /skin/
Disallow: /stats/
Disallow: /var/

# Paths (clean URLs)
Disallow: /index.php/
Disallow: /catalog/product_compare/
Disallow: /catalog/category/view/
Disallow: /catalog/product/view/
Disallow: /catalogsearch/
#Disallow: /checkout/
Disallow: /control/
Disallow: /contacts/
Disallow: /customer/
Disallow: /customize/
Disallow: /newsletter/
Disallow: /poll/
Disallow: /review/
Disallow: /sendfriend/
Disallow: /tag/
Disallow: /wishlist/
Disallow: /catalog/product/gallery/

# Files
Disallow: /cron.php
Disallow: /cron.sh
Disallow: /error_log
Disallow: /install.php
Disallow: /LICENSE.html
Disallow: /LICENSE.txt
Disallow: /LICENSE_AFL.txt
Disallow: /STATUS.txt

# Paths (no clean URLs)
Disallow: /*.php$
Disallow: /*?SID=

1 个答案:

答案 0 :(得分:0)

您发布的robots.txt似乎不是那个you're currently using。您当前的robots.txt包含:

User-agent: Googlebot
Allow: /blocked-folder/css/
Allow: /blocked-folder/java/

...

Disallow: /skin/

因此,您明确告诉Googlebot不要在/skin目录中获取文件。

修改:您还有以下规则

Disallow: /*.php$

不允许所有PHP文件。删除这些行,你会没事的。

相关问题