|Canonical Tag||301 Rdirect tag|
•Used when multiple URLs with similar content exist and one needs to be declared the original content.
•Used when a URL DOES NOT exist anymore and needs tobe redirected to another one.
•Used when multiple URLs land on the same content. Example, in ecommerce site
•Used when one is changing domains or changing protocols.
•Used to tell search engines that only canonical versions needs to appear in search engine.
•Used to tell search engines that new URL is the one which should be used and to pass the link authority from old page to new page.
•To implement canonical tags,it needs to be placed in the head section of HTML
•To implement this, web owners need to modify .htaccess file.
•Example, an e-commerce site has a product which appears in multiple catgories.This can result in generating multiple urls but with the same content/product.Only one URL needs to be declared canonical and all other URLs must be have canonical in the head section.
|•Example: If a webmaster has a website that uses http protocol and later decide to buy SSL protocol for the website. Since the protocol changes, it is important to let the users know that the content has moved permanently.This is where permanent 301 redirects should be used.|
•Syntax for Canonical tag is
<link rel="canonical" href="https://www.onlineidealab.com/test1page/" />
|•Syntax for 301 Redirect |
RedirectMatch 301 /seo/oldfile.php https://www.onlineidealab.com/seo/newfile.php