问题原文
原帖链接 · Kres · CC BY-SA 3.0
So I read a little bit about SEO and found out that Google does not like websites where content can be accessed with both www and non-www.
All HTTP requests on my website are redirected to HTTPS on application level (I hope I expressed myself correctly).
On the left is an URL typed in the address bar and on the right is a final URL (they are not all redirects as stated in the original question):
example.com→https://example.comhttps://example.com→https://example.comwww.example.com→https://example.comhttps://www.example.com→https://www.example.com
We can see that the 4th scenario allows content to be accessed via www. Is this a big SEO issue?
已采纳解答
原帖链接 · Michael d · CC BY-SA 3.0
It's fine to have both https://www.example.com and https://example.com, though it's not preferred and it can cause some issues.
The major issue is duplicate content. Google won't know whether to index pages with www or without www unless you tell it what to do.
You can set your preferred URL version in search console to instruct Google to either index your pages with or without www.
Also, you should strongly look at either 301 redirecting one of the versions to the other, or using rel=canonical tags.
If you don't want the www. version, you can 301 redirect https://www.example.com to https://example.com. Or vice versa. This will prevent your pages from being served under duplicate URLs.
If you can't 301 redirect the www duplication, you can set rel=canonical https://example.com/page-name on all of your pages, especially the ones on the version of https://www. This will tell Google which page to index and which one not to.
You should also try to make sure that you don't have any duplication issues with HTTP and HTTPS, though it seems that you have the proper redirects in order.
But you do need to address the duplication of both existing www and the nonexisting www URLs. Having both of them means that all of your URLs have duplications, and so you need to properly instruct Google to index the one you want.
301 redirects and rel=Canonical is how you address that.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
