规范网址链接 [英] Canonical URL link

查看:51
本文介绍了规范网址链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用规范的URL链接

I am using a canonical url link

<link rel="canonical" href="http://test123.com" />

以避免网站的http和https版本之间出现重复的内容问题.目前,我已经设置为http和https版本的头部都有规范链接.

to avoid duplicate content issues between http and https versions of a site. At the moment I have it set up that both the http and https versions have the canonical link in the head section.

这是正确的吗?或者我应该仅在https版本的开头部分有规范链接,而在http版本的内容中没有?还是有关系吗?

Is this correct or should I only have the canonical link in the head section on the https version and nothing on the http version? Or does it matter either way?

(我希望机器人将我的http版本而不是https版本编入索引).

(I want bots to index my http version and not my https version).

推荐答案

我认为您可以像这样在http中设置规范网址

In my opinion you can set your canonical url in http like so

<link rel="canonical" href="http://test123.com" />

用于http和https.漫游器将为您的http规范网址编制索引.如果您需要该页面的https版本,则可以在http页面上进行重定向.如果用户访问 http://test123.com ,则可以根据需要将用户重定向到https页面.

for both http and https. Bots will be index your http canonical url. If you need https version of that page, you can make a redirect on the http page. If a user goes to http://test123.com you can redirect user to https page according to your needs.

这篇关于规范网址链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆