javascript给网站带来丰富的用户体验,越来越多的网站开始应用angularjs/emberjs这类MVC来开发web应用,可以说能够使用native方式来看法的手机app基本都可以使用替代的js框架来开发,这给web开发及web用户带来了前所未有的便利。但是不幸的是,到目前为止,主流的搜索引擎对于javascript的动态内容几乎无法读取,因此你的网站本身内容再丰富,对用户再友好,在google,baidu那里也是一无所知。这,相信对于网站的owner来讲都是一个巨大的问题,谁也不希望自己的网站在搜索引擎那里得不到检索。如何解决这个问题呢?

有一个简单的思路是:googlebot会抓取网页的<noscript>google要看的内容</noscript>,这样我们通过phanmjs这样的headless browser动态serve googlebot以<noscript>所包含的内容是一个workaround。但是在这里要注意google的相关政策:

cloaking refers to the practice of presenting different content of URLs to users and search engines.Serving up different results based on user-agent may cause your site to be perceived as deceptive and removed from googl index

总的来说,你需要给到google和用户基本相同的内容。比如如果用户js功能关闭,那么它也应该看到和googlebot相同的内容。

一些隐身的具体例子:

给google一个html静态文件,而给用户展示一个image或者flash;

给google和给用户以不同的内容;

当你的网站包含一些无法被google crawlable的内容(比如除了flash,js,image外的富媒体),你不能给google以隐藏的内容。因为你应该考虑到那些真正访问你的网站的用户也是无法看到这些内容的。

google的建议是:对那些关闭image功能的用户提供alt text描述image信息,在noscript tag中提供js的文本替代内容(注意:核心的要求就是你对用户及google一视同仁,内容基本一样~!)

ensure that you provide the same content in both elements(for instance, provide the same text in js in the noscript tag)

如果你的网站持续不断地执行:noscript和js部分内容不一致,google将会采取行动。

当googlebot检索一个包含js的网页时,它会index那个网页,但是它并不会follow或者index任何在js中所隐含的链接。使用js本身是合法的web实践。然而,使用js故意欺骗js是不被允许的。例如,placing in different text in js than in a noscript tag violates our webmaster guidelines because it displays different content for users(who see the jsbased text)than for google(which see the noscript-based text)。

Along those lines, it violates the webmaster guidelines to embed a link in js that redirects the user to a different page with the intent to show the user a different page than the search engine sees. When a redirect link is embedded in js, the search engine indexes the original page rather than following the link, whereas users are taken to the redirect target. Like cloaking, this practice is deceptive because it displays different content to users and to googlebot, and can take a visitor somewhere other than where they intended to go.

Note that placement of links within jasvascript is alone not deceptive. When examining js on your site to ensure your site adheres to google guidelines, consider the intent:

Keep in mind that since search engines generally can't access the contents of JavaScript, legitimate links within JavaScript will likely be inaccessible to them (as well as to visitors without Javascript-enabled browsers). You might instead keep links outside of JavaScript or replicate them in a noscript tag. Doorway pages

Doorway pages are typically large sets of poor-quality pages where each page is optimized for a specific keyword or phrase. In many cases, doorway pages are written to rank for a particular phrase and then funnel users to a single destination.

Whether deployed across many domains or established within one domain, doorway pages tend to frustrate users, and are in violation of our Webmaster Guidelines.

Google's aim is to give our users the most valuable and relevant search results. Therefore, we frown on practices that are designed to manipulate search engines and deceive users by directing them to sites other than the ones they selected, and that provide content solely for the benefit of search engines. Google may take action on doorway sites and other sites making use of these deceptive practice, including removing these sites from the Google index.

If your site has been removed from our search results, review our Webmaster Guidelines for more information. Once you've made your changes and are confident that your site no longer violates our guidelines, submit your site for reconsideration.

  • 最好不要使用display: none来隐藏一个h1标签,你可以使用text-indent: -9999px这种模式来隐藏,否则可能会受到处罚;
  • 另外一种方法是默认都是显示的,document.ready()起来后,js直接把需要默认不显示的内容给设置对应css类,这个可能是解决SEO的最佳方案了。

angularJS web应用SEO的更多相关文章

  1. AngularJs + Web API 页面开发(一)

    AngularJS这个JS框架是个神马东东我也不太清楚,我也是初学者~~ AngularJS适用于single page App,单页面程序都是局部刷新的,这一点和Ajax有第一的区别,因为使用Aja ...

  2. 《Node.js+MongoDB+AngularJS Web开发》读书笔记及联想

    总体介绍 <Node.js+MongoDB+AngularJS Web开发>,于2015年6月出版,是一本翻译过来的书,原书名为<Node.js,MongoDB and Angula ...

  3. Angularjs web应用

    构建兼容浏览器的Angularjs web应用 背景 随着mvvm逐渐成熟,现在使用jQuery构建web应用已经显得过时了,而且使用jQuery需要编写更多的代码去控制dom的取值.赋值.绑定事件等 ...

  4. 25个超有用的 AngularJS Web 开发工具

    AngularJS是为了克服HTML在构建应用上的不足而设计的.HTML是一门很好的为静态文本展示设计的声明式语言,改善了JavaScript. 下面我要说的就是25个超有用的AngularJS工具, ...

  5. 构建兼容浏览器的Angularjs web应用

    背景 随着mvvm逐渐成熟,现在使用jQuery构建web应用已经显得过时了,而且使用jQuery需要编写更多的代码去控制dom的取值.赋值.绑定事件等,而mvv从底层实现了对以上操作的支持,让程序员 ...

  6. AngularJS Best Practices: SEO

    Google can execute AJAX & JavaScript for indexing, you can read the below link for more detailed ...

  7. [Angularjs]asp.net mvc+angularjs+web api单页应用

    写在前面 最近的工作一直在弄一些h5的单页应用,然后嵌入到app的webview中.之前一直在用angularjs+html+ashx的一套东西.实在是玩腻了.然后就尝试通过asp.net mvc的方 ...

  8. web的seo

    摘要:搜索引擎优化是一种具有很高技术性的活动,也是一种营销功能,必须将它作为营销活动处理.SEO从业者必须理解公司的服务.产品.总体业务战略.竞争形势.品牌.未来网站开发目标和相关的业务构成. SEO ...

  9. [Angularjs]asp.net mvc+angularjs+web api单页应用之CRUD操作

    写在前面 前篇文章整理了angularjs学习目录,有园子里的朋友问我要这方面的demo,周末也没什么事,就在之前的单页应用的demo上面添加了增删改查的操作.代码比较简单,这里只列举比较重要的代码片 ...

随机推荐

  1. easyUI----纵向合并单元格

    使用Easyui-DataGrid过程用.做统计/报表等时经常会使用到合并单元格,原生态Easyui-DataGrid没有合并单元格的属性或方法. 解决方案: 代码一 onLoadSuccess: f ...

  2. 基于steamworks获取steam用户头像

    查看官网api,使用c++写的,转成c#之后,有个问题就是,图片显示问题 我们可以获取到一个含有图片信息的byte[] 然后 private Texture2D downloadedAvatar; p ...

  3. ActiveMQ_Linux安装

    首先ActiveMQ查看你需要的版本 官网:http://activemq.apache.org/ 我这里选择的是:apache-activemq-5.14.0-bin.tar.gz 然后在linux ...

  4. 有向图和无向图的数组C++实现

    源码:https://github.com/cjy513203427/C_Program_Base/tree/master/55.%E5%9B%BE 结点类Noded.h 不需要存储索引 #pragm ...

  5. java中的interrupt(),InterruptException和wait(),sleep()

    标题中的几个概念大概设计到线程同步以及线程阻塞这两个概念.线程同步,就是同一时刻,只有一个线程能执行指定的代码:另外一个线程阻塞就是当前线程暂时停在某个位置,等待某个条件成立之后再继续往下面执行.   ...

  6. 架构实战项目心得(十):基于spring-ladp的统一用户中心结构设计以及代码结构设计

    一.目录设计 1 公司 2 部门 3 注册人员 4 层级人员 二.规则 1 注册 自行注册人员放到模拟公司的目录下,等所属公司组织结构建立完毕,将此人员迁移到所属公司(或者删除此人员,所属公司新建此人 ...

  7. tomcat 修改 编码

    <Connector URIEncoding="UTF-8" connectionTimeout="20000" port="8080" ...

  8. 在centos linux上安装docker

    前置条件 64-bit 系统 kernel 3.10+ 1.检查内核版本,返回的值大于3.10即可. $ uname -r 2.确保yum是最新的 $ yum update 3.安装 Docker y ...

  9. spring security入门

    1. Restful API和传统API的区别 用URL描述资源 用http描述方法行为,用http状态码描述结果 使用json交互数据 RESTful是一种风格,不是强制的标准 2. 使用sprin ...

  10. C#中匿名委托以及Lambda表达式的学习笔记

    一. C#从1.0到4.0, 随着Linq,泛型的支持,代码越来越简单优雅 , , , , , , , , , }; IEnumerable< select n; newNums = newNu ...