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

Does it hurt SEO to change the URL and content without refreshing the page?

· 52CE 我爱测

If you look at the example site below, when you click on any page in the menu, the content and url on the site changes, but the page is not refreshed. They probably do this feature with AJAX. My question is, would something like …

问题原文

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

If you look at the example site below, when you click on any page in the menu, the content and url on the site changes, but the page is not refreshed. They probably do this feature with AJAX.

My question is, would something like this hurt SEO? The site I gave an example is not a site that already does SEO work. If it doesn't hurt SEO, I'm considering adding it to my own website. It contributes to the user experience, but I was undecided about SEO.

Sample Website (discord.com)

已采纳解答

原帖链接 · Maximillian Laumeister · CC BY-SA 4.0

This setup is generally called a "single page app" setup. If done properly, it can have no negative impact on SEO. If done improperly, in some cases it could cause your website to drop from search engine indexes completely.

It's difficult to get this type of setup working properly without an external tool or library, but there are many great choices for libraries. The Wikipedia page for Single Page Application has a lot more detail on how they work, as well as a list of common libraries used for implementing them.

If you do decide to make your website into a single page application like this, make sure it follows SEO best practices such as using simple code to make pages load as efficiently as possible to crawlers such as Googlebot, and updating the URL bar with History.pushState() whenever the user clicks a link to load new content. There's also this article from Search Engine Journal that goes into more detail about how to make sure your SPA is properly optimized for SEO.

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

资料来源与适用范围

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

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

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