问题原文
原帖链接 · fnune · CC BY-SA 4.0
I'm planning to build an application which will end up displaying duplicate content.
app.domain.com/content/ID # Completely rendered on the client, behind a wall of JS
www.domain.com/content/ID # Server-rendered, SEO-friendly
Under app.domain.com I'll be serving a React SPA that renders completely on the client.
Under www.domain.com I'll be serving the same React application but rendered on the server, to improve SEO.
The content on both applications will be the same, but presumably the server-rendered version will have better SEO. To avoid duplicate content problems, I'll be following Google's "Consolidate duplicate URLs" guide. I will:
- Specify a preferred domain:
www.domain.com. - Set a
rel=canonicalheader in my response for pages underapp.domain.com/content/IDpointing to the correspondingwww.domain.com/content/IDURL.
Here is my question: which application's page speed counts towards SEO? Is it the page speed of the client-side rendered application (slow because of all the JS that needs to be downloaded in a blocking way) or is it the page speed of the server-render, SEO-friendly version?
已采纳解答
原帖链接 · Hayk Saakian · CC BY-SA 4.0
I have not seen this exact situation, but in similar situations (where there are two URLs and one points to another) Google tends to use the canonical version.
Word of warning though: Splitting up your site between app.domain.com and www.domain.com will be "eventually" consistent in Google. While they do recognize canonical tags, they don't always do so very quickly.
The duplicate domain will slow you down from an overall SEO perspective.
What kind of speed difference are you talking about by the way?
If it's the difference between 1 second and 2 seconds then it's probably not worth having them separate.
Use a tool like gtmetrix to run speed tests on your competition.
If all your competitors are loading after 5-10 seconds, then your improvement from 2 seconds to 1 second won't really make a big difference in the grand scheme of things.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
