search

Home  >  Q&A  >  body text

node.js - Angularjs/Reactjs如何SEO

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

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

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

天蓬老师天蓬老师2875 days ago697

reply all(9)I'll reply

  • 阿神

    阿神2017-04-17 11:48:28

    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-...

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 11:48:28

    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

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 11:48:28

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

    reply
    0
  • 阿神

    阿神2017-04-17 11:48:28

    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.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 11:48:28

    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

    reply
    0
  • 阿神

    阿神2017-04-17 11:48:28

    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

    reply
    0
  • 迷茫

    迷茫2017-04-17 11:48:28

    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

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 11:48:28

    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

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 11:48:28

    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

    reply
    0
  • Cancelreply