Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Seo 如何告诉搜索引擎使用我更新的robots.txt文件?_Seo_Robots.txt - Fatal编程技术网

Seo 如何告诉搜索引擎使用我更新的robots.txt文件?

Seo 如何告诉搜索引擎使用我更新的robots.txt文件?,seo,robots.txt,Seo,Robots.txt,以前,我曾阻止搜索引擎robots,以防止使用robots.txt文件爬行我的网站,但现在我想取消阻止它们 我更新了robots.txt文件并允许搜索引擎robots对我的网站进行爬网,但搜索引擎似乎仍然使用我的旧robots.txt文件,我如何告诉搜索引擎使用我的新robots.txt文件?或者我的robots.txt文件有问题吗 我的旧robots.txt文件的内容: User-agent: * Disallow: / User-agent: * Allow: / # Disallow

以前,我曾阻止搜索引擎robots,以防止使用robots.txt文件爬行我的网站,但现在我想取消阻止它们

我更新了robots.txt文件并允许搜索引擎robots对我的网站进行爬网,但搜索引擎似乎仍然使用我的旧robots.txt文件,我如何告诉搜索引擎使用我的新robots.txt文件?或者我的robots.txt文件有问题吗

我的旧robots.txt文件的内容:

User-agent: *
Disallow: /
User-agent: *
Allow: /

# Disallow these directories, url types & file-types
Disallow: /trackback/
Disallow: /wp-admin/
Disallow: /wp-content/
Disallow: /wp-includes/
Disallow: /xmlrpc.php
Disallow: /wp-
Disallow: /cgi-bin
Disallow: /readme.html
Disallow: /license.txt
Disallow: /*?*
Disallow: /*.php$
Disallow: /*.js$
Disallow: /*.inc$
Disallow: /*.css$
Disallow: /*.gz$
Disallow: /*.wmv$
Disallow: /*.cgi$
Disallow: /*.xhtml$
Disallow: /*/wp-*
Disallow: /*/feed/*
Disallow: /*/*?s=*
Disallow: /*/*.js$
Disallow: /*/*.inc$

Allow: /wp-content/uploads/

User-agent: ia_archiver*
Disallow: /

User-agent: duggmirror
Disallow: /

Sitemap: https://example.com/sitemap.xml

我的新robots.txt文件的内容:

User-agent: *
Disallow: /
User-agent: *
Allow: /

# Disallow these directories, url types & file-types
Disallow: /trackback/
Disallow: /wp-admin/
Disallow: /wp-content/
Disallow: /wp-includes/
Disallow: /xmlrpc.php
Disallow: /wp-
Disallow: /cgi-bin
Disallow: /readme.html
Disallow: /license.txt
Disallow: /*?*
Disallow: /*.php$
Disallow: /*.js$
Disallow: /*.inc$
Disallow: /*.css$
Disallow: /*.gz$
Disallow: /*.wmv$
Disallow: /*.cgi$
Disallow: /*.xhtml$
Disallow: /*/wp-*
Disallow: /*/feed/*
Disallow: /*/*?s=*
Disallow: /*/*.js$
Disallow: /*/*.inc$

Allow: /wp-content/uploads/

User-agent: ia_archiver*
Disallow: /

User-agent: duggmirror
Disallow: /

Sitemap: https://example.com/sitemap.xml


将需要为每个搜索引擎独立完成,否则它可能只是随着时间的推移而发生。对于谷歌,使用谷歌搜索控制台工具。这将允许您上传新的robots.txt并提交以重新爬网。

您能告诉我们如何将我们的新robots.txt提交到谷歌搜索控制台吗?使用robots.txt测试工具的提交功能新robots.txt中的错误:记录中不允许有空行(每条记录以
用户代理
行开头)。您还可以删除
Allow://
(因为这是默认设置)。