【问题标题】:how do I structure my site to make it SEO friendly as its single page application built with AngularJS我如何构建我的网站以使其对 SEO 友好,因为它是使用 AngularJS 构建的单页应用程序
【发布时间】:2024-01-24 10:02:01
【问题描述】:

我需要知道如何构建我的网站以使其对 SEO 友好。该网站是一个使用 AngularJS 构建的 SPA。

【问题讨论】:

标签: angularjs seo single-page-application


【解决方案1】:

为了构建你的预渲染服务器,sipider 不会分析 javascript。

https://github.com/steeve/angular-seo

【讨论】:

    【解决方案2】:

    不再需要预呈现您的网站。 Google 可以抓取您的 javascript 网站。我建议使用ui路由器并启用html5模式。

    • 不要期望 JS 生成的内容会出现在 Webmasterstools 中 抓取为爬虫。
    • 不要忘记重定向(请参阅 github 上的 ui router wiki 页面)
    • 将站点地图用于未在您的页面内链接的网址(例如选择框)

    google 的理解非常好。

    【讨论】:

      最近更新 更多