node.js - Angularjs/Reactjs如何SEO
天蓬老师
天蓬老师 2017-04-17 11:46:28
0
9
662

最近在琢磨Nodejs,主要采用如下第三方库:
Express.js
Swig.js
Angular.js
React.js
gulp.js

对搜索进行了简单测试,部署了一个纯静态页面和Node.js的页面,在百度和谷歌中直接搜索域名,发现纯静态页面的能搜索到,但Node.js怎么都搜索不到。

想问下大家Nodejs的页面怎么SEO呢?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(9)
阿神

I have done some research on this problem, but there is no good solution

http://isay.me/2014/06/angular-prerender-seo-and-use-resolve-for-page-...

大家讲道理

If you use a front-end library such as Angular/React, you can use Prerender for SEO

I personally think that the reason why web pages cannot be indexed by search engines is not due to Node.js. Node.js can also write static web pages, which can also be crawled by search engine crawlers. The main reason is Angular/React, because these front-ends The library allows web content to be loaded dynamically. All search engines see are some js tags. Only by obtaining the content in advance can the web page be correctly included by search engines

Peter_Zhu

I feel like it’s better to change the title. It should be called How to SEO with angularjs

阿神

If you use back-end rendering, there will be no problem with SEO.
Doesn't express have a backend routing?

If it is made into a single-page application, the routing will inevitably be controlled by the front end, and the rendering method will also be front-end rendering. Since the page is made up of characters, there is no so-called SEO.

伊谢尔伦

Not easy to do

http://angularjs.cn/ I remember seeing a post on this site saying that it made two copies, one specifically for search engines

阿神

Google is totally fine. I have an English website, based on Angularjs, and Google can include it normally

Also, this problem seems to have nothing to do with Nodejs

迷茫

The introduction here is very detailed. If you don't understand something, you can chat with the author, he is very enthusiastic.
http://www.cnblogs.com/whitewolf/p/3464555.html

Peter_Zhu

It has nothing to do with node.js. It is a common problem of SPA (Single Page App). If you use React, you can consider using isomorphic method to render pages that require SEO with the server. However, it will have a certain impact on performance and development will be complicated. Click

Peter_Zhu

Look back at the question from more than a year ago and answer it yourself:
Solution: isomorphic, that is, back-end rendering~

Two cores of isomorphism:
1. environment agnostic
2. shim for the each environment

Recommend a very good book (please search CSDN resources):
Building Isomorphic JavaScript Apps

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template