问题原文
原帖链接 · Zebda · CC BY-SA 4.0
I was wondering what canonical url to use for my site's pages other than the home page.
For example, if I have https://example.com/page-1, which should I use:
https://example.com/page-1https://example.com- Something else entirely?
I see various examples in sites I visit online, and wanted to know which would be best to use.
已采纳解答
原帖链接 · jrtapsell · CC BY-SA 4.0
What does canonical URL say
Canonical URL says that although there may be multiple URLs with this content, you should treat the canonical one as the URL of this page.
Which should I use for /page-1
If you would only want one of the pages to come up when you are searching, because they are identical, or near identical, then you should use the same canonical URL, otherwise use different ones.
Uses for canonical URL
In a lot of these cases redirects could be used instead, and are usually preferable.
- Setting if http or https shows in searches
https://www.example.comvshttp://www.example.com
- Setting if www should be used or not
www.example.comvsexample.com
- Pages that can be accessed multiple ways
www.example.com/blue-widgetvswww.example.com/?q=blue-widget
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
