From this page on the blog of Matt Cutts, he says that rel=canonical
should be a secondary choice if you can't use a 301 redirect. Is there any performance issue with using a 301 redirect instead of a rel=canonical
?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
In my experience, the performance difference is negligible. There are more steps involved in the implementation of 301 redirects, so rel=canonical
might perform slightly better. The extra steps are typically executed very quickly and should not add any noticeable delay or strain on server resources.
rel=canonical
- User makes a request for /non-canonical.html
- Server looks up canonical URL: /canonical.html
- Server builds a page that includes the canonical tag and sends it to the user
301 Redirect
- User makes a request for /non-canonical.html
- Server looks up canonical URL: /canonical.html
- Server issues a 301 redirect to the canonical URL.
- User's browser automatically makes a second request for /canonical.html
- Server discovers that this request is for a canonical URL.
- Server builds a page and sends it to the user.