javascript - angular.js seo - 谷歌索引

标签 javascript angularjs seo

我当前的 html 如下所示:

<title ng-bind="title">Loading</title>
<meta name="description" content="[[description]]">
<base href="/">
<meta name="fragment" content="!">

angular.js 配置:

$locationProvider.html5Mode(true);
$locationProvider.hashPrefix('!');

我认为让 googlebot 正确索引站点就足够了。但是不,它没有采用正确的标题或描述。如果我运行“fetch as googlebot”网站正确呈现。我该怎么办?

最佳答案

我认为您不再需要为 Google 抓取工具预呈现您的页面。不久前,它开始注意到 javascript 的变化。

我实际上已经回答了关于 AngularJS seo that will help you here: 的问题

在上面的链接上寻找我的答案。我还提供了一个可能对您有用的指令。

顺便问一下,你确定你正确使用了 angularjs 表达式吗?您有使用 [[]] 的描述,通常是 {{}}

关于javascript - angular.js seo - 谷歌索引,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32394043/

相关文章:

javascript - react-admin: 错误: dataProvider 抛出错误。它应该返回一个被拒绝的 Promise - 容易修复吗?

javascript - jQuery UI 平滑过渡

html - Google SEO 标题和元描述

php - 外部网站的内部重定向网址显示在谷歌上

javascript - 用对象 react Native FlatList

javascript - Angular2,输入掩码 ngModel 绑定(bind)

javascript - 使用 Javascript 在 json 中进行查询

javascript - 在angularjs中添加新的输入

SEO:谷歌机器人是否在隐藏的 div 中看到文本

javascript - 从json文件中读取数据并将其显示在html页面上