Angular JS应用程序不会在Google中抓取和索引

Angular JS Application doesn't crawl and index in Google?

本文关键字:抓取 索引 Google JS 应用程序 Angular      更新时间:2023-09-26

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

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

我已经为Angular JS应用程序设置了html5Mode,并且还设置了为特定请求生成html快照。

当Google爬虫来的时候它会得到我的网址比如http://templatic.net/test/?_escaped_fragment_=/job_category/mobile换成http://templatic.net/test/job_category/mobile

但是当我去谷歌网站管理员,点击Fetch as Google的特定链接,然后它不会返回我的HTML快照的特定URL。

我还在谷歌网站管理员工具中添加了sitemap.xml,它被接受,但没有一个链接被索引。

我不知道我做错了什么。

我也遇到过类似的问题。我使用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>