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

Fixing duplicate without user-selected canonical in Blogger

· 52CE 我爱测

I recently started blogging through blogger. On my Google Search Console account, I got the error "Duplicate without user-selected canonical" error. When I inspected the affected pages I saw: ?m=1 at the end of the affected URLs.…

问题原文

原帖链接 · Muhammad Ahmad · CC BY-SA 4.0

I recently started blogging through blogger. On my Google Search Console account, I got the error "Duplicate without user-selected canonical" error. When I inspected the affected pages I saw:

?m=1  

at the end of the affected URLs. I saw a fix online and added the following line in the HTML of my Blogger account:

<link expr:href='data:blog.url' rel='canonical'/> 

I also saw a similar line to the one above which is as follows:

<link expr:href='data:blog.url.canonical' rel= 'canonical'/>

I wanted to ask that is there a difference between these two lines of code. Which one is the correct line? Also if the original URL without ?m=1 is indexed and the URL with ?m=1 is not indexed should I leave it like this or do I need to enter one of the above line in the HTML code of my website?

已采纳解答

原帖链接 · Rohit Gupta · CC BY-SA 4.0

An URL with a parameter is a different URL as compared to one without a parameter. If they both serve the same page then you have a duplicate page. The fix is to put a canonical tag with the preferred URL in it.

What is a canonical URL?

A canonical URL is the URL of the page that Google thinks is most representative from a set of duplicate pages on your site. For example, if you have URLs for the same page (example.com?dress=1234 and example.com/dresses/1234), Google chooses one as canonical.

From developers.google


<link rel="canonical" href="https://www.example.com"> or

<link rel="canonical" href="https://example.com">

are the normal way to specify a canonical, depending on whether you are supporting www. But it is advisable to put in a complete (absolute) Link. If you do not do that then you can still have duplication because of http/https protocol and www/non www preferences.

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

资料来源与适用范围

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

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

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