The use of rel="canonical"
is often required, in order to deal with the issue of duplicate content. Simply put, it 'tells' search engines which is the preferred URL version.
To achieve this, the following example code needs to be entered within the <head>
tags:
<link rel="canonical" href="https://www.example.com/product/product-name/" />
Simple enough.
My question is really orientated on how this code is treated by search engines. Which scenario best describes said treatment:
Scenario A:
Search engines will read the duplicate page, in its entirety, and then look at the rel="canonical"
link. Upon reading the Canonical link, it will then decide on whether the pages are duplicates or not and index accordingly.
In other words, the use of rel="canonical"
is merely a suggestion to search engines, for their own discretion.
Scenario B:
When a search engine Bot arrives onto the page, it will start to read the source code, starting at the top of the page, with <!DOCTYPE html>
. It will then work its way down the source code. In the event it comes across the rel="canonical"
entry, it will stop reading the source code and crawl through to the Canonical link, picking up where it left off, as to read the rest of the page, to be indexed.
This scenario, indicating that the rel="canonical"
entry acts as a redirect for Bots.