大网数据广告活动
网站运营与故障问答

Submit URLs created by our client side rendered Angular site through Google Search Console or will Google automatically find them?

· 52CE 我爱测

When deploying an Angular App with client side rendering only, do we need to take additional steps for Google to index the app, or is it automatic. I did go to search console and register the site, but I'm curious as to whether I…

问题原文

原帖链接 · Ole · CC BY-SA 4.0

When deploying an Angular App with client side rendering only, do we need to take additional steps for Google to index the app, or is it automatic.

I did go to search console and register the site, but I'm curious as to whether I need to create an XML site map file, etc. or will Google automatically discover the routes?

已采纳解答

原帖链接 · Stephen Ostermiller · CC BY-SA 4.0

Googlebot now executes JavaScript and can automatically crawl and render pages on client side rendered sites. It sounds like you are already doing so, but to let the crawler do its job you need to:

  • Create a separate URL for each piece of content on your site. Google needs to be able to send visitors directly to the content they searched by directing them to a specific URL for that content. You can route all the URLs to the same handler code in Angular and have your code decide which content is appropriate based no the URL.
  • Render <a href=""> links on pages to link to other pages. You can intercept user clicks on those links and update just the content on the page that needs to change and update the URL using pushState. There is no need to make users completely load the whole page again when navigating. However, Google won't be able to find all the URLs on the site unless you use regular anchor links in your navigation elements.

It still might be a good idea to create an XML sitemap. Google is very slow about crawling and rendering client side generated sites. An XML sitemap could speed up the process of getting Google to discover and crawl your entire site. Without a sitemap it could take months, but with a sitemap it might take as little as a few weeks.

Just because you have an XML sitemap, you still need to link your URLs together with anchor links. Sitemaps help with URL discovery, but they don't help with URL reputation or rankings. For good SEO, a sitemap is not sufficient. You need to let Googlebot see the relationships between your pages so that it can calculate Pagerank. See The Sitemap Paradox.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2020-09-23)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。