如何允许Google,Facebook bot爬网程序可以在AWS CloudFront上索引媒体文件?

问题描述 投票:0回答:1

我将媒体放在AWS s3上,并设置了具有简短名称的CloudFront以获取图像资源。

例如:1.我的域名是:https://example.com2. cloudFront是:https://cdn.example.com->示例资源:https://cdn.example.com/sample.jpg

和robots.txt文件:1. https://example.com/robots.txt

Sitemap: https://example.com/sitemap.xml
User-agent: *
Disallow: /cart
User-agent: adsbot-google
Crawl-delay: 1
  1. https://cdn.example.com/robots.txt用户代理: *不允许:

但是当我使用Google Search Console测试索引时,它会提醒我:允许爬网吗? -> 否:被机器​​人阻止页面提取-> 失败:被robots.txt阻止

enter image description here

如何为CloudFront设置允许Facebook,Google bot爬虫?请帮助我解决此问题。

谢谢!

web-crawler amazon-cloudfront googlebot google-crawlers
1个回答
0
投票

我和你有同样的问题。我的域名是https://asset.onyourmarkhk.com。我添加了robots.txt以允许所有操作,但Google仍显示与您相同的错误消息。

© www.soinside.com 2019 - 2024. All rights reserved.