Angular JS Application不会在Google中抓取和编入索引?

时间:2016-11-14 12:15:40

标签: javascript angularjs

我已经设置了所有内容来在Google搜索引擎中抓取我的Angular JS应用程序。

Website url : http://templatic.net/test/

我为Angular JS app设置了html5Mode,并设置了为特定请求生成html快照。

因此,当Google抓取工具到来时,我的网站会为http://templatic.net/test/?_escaped_fragment_=/job_category/mobile <{1}}获取http://templatic.net/test/job_category/mobile的网址

但是,当我访问Google网站管理员并点击Fetch as Google获取特定链接时,它就不会返回特定网址的HTML快照。

此外,我在Google网站站长工具中添加了sitemap.xml,但已被接受,但没有一个链接被编入索引。

我不知道我做错了什么。

1 个答案:

答案 0 :(得分:0)

我遇到了类似的问题。我正在使用iis服务器。我通过检查谷歌抓取工具来检查其用户代理并重定向到另一个服务器呈现应用程序,我返回元标记,解决了问题。

这是我的iis重定向规则

<rule name="Imported Rule 1" stopProcessing="true">
          <match url="(.*)" ignoreCase="false" />
          <conditions>
            <add input="{HTTP_USER_AGENT}" pattern="(facebookexternalhit)|(Twitterbot)|(Pinterest)|(Googlebot)|(developers.google.com)|(LinkedInBot)|(WhatsApp)" />
          </conditions>
          <action type="Redirect" url="https://myredirectionapp/snapshot?qp={R:1}" appendQueryString="false" />
        </rule>