首页 文章

SEO改变从Wordpress网站中更改robots.txt文件

提问于
浏览
1

我最近使用wordpress插件在我的网站上编辑了robots.txt文件 . 但是,由于我这样做,谷歌似乎已从他们的搜索页面删除了我的网站 . 如果我能得到关于为什么会这样,以及可能的解决方案的专家意见,我将不胜感激 . 我最初是通过限制谷歌访问的页面来增加我的搜索排名 .

这是我在wordpress中的robots.txt文件:

User-agent: *
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content/plugins
Disallow: /wp-content/cache
Disallow: /trackback
Disallow: /feed
Disallow: /comments
Disallow: /category/*/*
Disallow: */trackback
Disallow: */feed
Disallow: */comments
Disallow: /*?*
Disallow: /*?
Allow: /wp-content/uploads

Sitemap: http://www.instant-wine-cellar.co.uk/wp-content/themes/Wineconcepts/Sitemap.xml

3 回答

  • 2

    这是一个很好的WordPress robots.txt指令 . 如果您希望将上传内容编入索引,请添加 Allow: /wp-content/uploads ,但这没有意义,因为所有图片,pdf等都包含在您的帖子和页面中,并在那里编入索引 .

    User-agent: *
    Allow: /
    Disallow: /*?s=
    Disallow: /wp-admin/*
    Disallow: /wp-content/*
    Disallow: /wp-includes/*
    Disallow: /wp-content/cache
    Disallow: /wp-content/themes/*
    Disallow: /trackback
    Disallow: /comments
    Disallow: /category/
    Disallow: */trackback
    Disallow: */comments
    

    但最关键的信息是在你的页面来源:

    <meta name='robots' content='noindex,nofollow' />

    这意味着您在仪表板/设置/隐私中设置了隐私,即使在访问robots.txt之前也阻止了所有搜索机器人 .

    获得一个好的robots.txt文件并更改Wordpress隐私设置后,Google网站管理员工具会提高您的抓取速度,让Google更快地访问该网站 .

  • 5

    注意:"You blocked all bots because you're missing the critical Allow: / after User-agent: *"是 incorrect . 默认情况下,robots.txt将允许所有抓取,您通常不需要指定任何"allow"指令 .

    但是,“noindex”漫游器元标记将是不对网站内容编制索引的原因 .

    此外,robots.txt目前阻止所有抓取,以便搜索引擎无法判断该网站是否可以再次编入索引 . 如果您希望再次为站点编制索引,则需要从robots.txt文件中删除“disallow:/” . 您可以在Google的网站站长工具中验证,通过查找最新的robots.txt文件或使用“获取Googlebot”功能来测试网站上网页的抓取情况 .

  • 1

    我建议你使用谷歌网站主工具robots.txt检查器并输入正在消失的网址,并确保谷歌仍然会去那里 .

    这样您就可以验证它是否是您的robots.txt或其他内容

相关问题