如何防止搜索引擎将Angular 5网站编入索引?我不了解有关Firebase索引编制的文档,似乎它专门指对移动应用程序而不是Angular网站编制索引.
How do I prevent my Angular 5 site from being indexed by search engines? I don't understand the documentation on Firebase indexing, and it seems like it refers specifically to indexing a mobile app, not an Angular website.
我要添加robots.txt,还是Firebase使用其他方法?
Would I add a robots.txt, or does Firebase use another method?
推荐答案您可以做的几件事:
解决方案1
如果您有权访问网站HTML的域名和/或管理权限,则可以转到Google/Bing网站管理员工具,阻止您的网站从其仪表板中被索引.
If you have access to the domain name and/or administrative privileges to the websites' HTML, you can go to Google/Bing webmaster tools and block your site from being indexed from within their dashboard.
解决方案2
您可以添加robots.txt文件并全部禁止.这是一个示例:
You can add a robots.txt file and disallow all. Here is an example:
User-agent: * Disallow: /...或禁止使用特定路径:
...or disallow specific paths:
User-agent: * Disallow: /foo/ Disallow: /bar/来源
解决方案3
最简单的解决方案,将其添加到您的<head>:
The simplest solution, add this to your <head>:
<meta name="robots" content="noindex">来源
请注意,无论使用哪种解决方案,您都可能需要使用Google/Bing网站站长工具删除已被索引的所有链接,因为它们仍然存在.
Note that whichever solution you go with, you probably need to go to Google/Bing webmaster tools to delete any links that have already been indexed, because they will still be there.
删除Google URL
删除Bing URL
更多推荐
阻止Angular 5网站的搜索引擎索引
发布评论