问题原文
原帖链接 · Mani · CC BY-SA 3.0
I have the following 4 URLs. Are all these the same URL or different URLs from Google's SEO perspective? (Having a different query string makes it another URL?)
https://www.example.com/buy-web-products?task=domaincheck&Itemid=435https://www.example.com/buy-web-productshttps://www.example.com/buy-web-products?task=domaincheck&Itemid=435&req_order=ordernow&p=133&pre=1https://www.example.com/buy-web-products?task=domaincheckstep2&Itemid=435
已采纳解答
原帖链接 · DocRoot · CC BY-SA 4.0
Yes, those are all different URLs and are therefore different from Google's SEO perspective.
However, if these URLs return the same content (perhaps just displayed/sorted differently) then you need to canonicalise the URL by setting a rel="canonical" link element in the head section of the relevant HTML document. This is to ensure that only the canonical URL is returned in the search results. For example:
<link rel="canonical" href="https://www.example.com/buy-web-products">
Alternatively, you can set a rel="canonical" HTTP response header. For example:
Link: <https://www.example.com/buy-web-products>; rel="canonical"
Within Google Search Console (GSC), you can also tell Google which URL parameters to ignore (if you are unable to set the canonical URL). However, this only informs Google, you may still want to consider other search engines.
You can also block certain URL parameters from being crawled using robots.txt (consequently they are unlikely to be indexed). However, this doesn't attribute a canonical URL that should be returned instead.
Reference:
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
