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

www to non-www redirect - is duplicate content a big issue?

· 52CE 我爱测

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 exp…

问题原文

原帖链接 · 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):

  1. example.com → https://example.com
  2. https://example.com → https://example.com
  3. www.example.com → https://example.com
  4. https://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.

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

资料来源与适用范围

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

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

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