阻止Angular 5网站的搜索引擎索引-Firebase [英] Prevent Search Engine Indexing of Angular 5 Website - Firebase

查看:127
本文介绍了阻止Angular 5网站的搜索引擎索引-Firebase的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何防止搜索引擎将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网站的搜索引擎索引-Firebase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆