seo - 301 + Canonical 将子域链接到搜索引擎的根域?

标签 seo http-status-code-301 canonical-link

我希望将根域的搜索排名传递到我的博客子域。我不确定这是否有意义,但我想也许 301 从 mydomain.com/blog 重定向到 blog.mydomain.com 并使用规范标签链接回 mydomain.com/blog 会有所帮助。

例如:用户或搜索引擎转到 mydomain.com/blog/my-post,301 重定向将他们带到 blog.mydomain.com/my-post。该帖子上有链接标签:rel='canonical' href='mydomain.com/blog/post'

或者,一个更好的例子是有人链接到 blog.mydomain.com/post 并且入站链接的优点被转移到 mydomain.com。我不确定这是否适用于另一个方向:即指向 mydomain.com 的链接将链接优度转移到 blog.mydomain.com

最佳答案

不,这行不通。搜索引擎将遵循 301 重定向来确定“真实的”规范 URL。

参见 Google FAQ :

Can rel="canonical" be a redirect?

Yes, you can specify a URL that redirects as a canonical URL. Google will then process the redirect as usual and try to index it.

然而,RFC 6596不鼓励使用永久重定向:

To better ensure that applications properly handle the canonical link relation, administrators ought to consider the following guidelines:

[…]

Avoid designating the target (canonical) as:

[…]

The source IRI of a permanent redirect (for HTTP, this refers to 300 and 301 response codes defined in Sections 10.3.1 and 10.3.2 of [RFC2616]

关于seo - 301 + Canonical 将子域链接到搜索引擎的根域?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8548749/

相关文章:

http - 使搜索 URL 搜索引擎友好 : hash -> what?

apache - 错误处理和搜索引擎

webpack - 使用 Webpack 开发服务器进行 301 重定向

redirect - nginx 从客户端浏览器缓存中清除 301 永久

php - 我的 SEO 公司是否试图破坏我的网站?

asp.net-mvc - 如何在 ASP.NET MVC 中拥有小写路由?

wordpress - .htaccess 重定向在 Apache 上的 WordPress 3.5.1 中不起作用

nginx - 如何从 SEO 的角度从 HTTP/1.1 迁移到 HTTP/2?

error-handling - Scrapy下载文件错误

magento - 如何将规范标签添加到 Magento 中的页面?