问题
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.
来源:https://stackoverflow.com/questions/15916949/site-performance-rel-canonical-vs-redirect-301