阻止Angular 5网站的搜索引擎索引

编程入门 行业动态 更新时间:2024-10-10 02:14:55
本文介绍了阻止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网站的搜索引擎索引

本文发布于:2023-11-01 00:48:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1547760.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:索引   搜索引擎   网站   Angular

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!