SEO Meta Tags - canonical, robots
There are techniques used to prevent penalties from search engines due to duplicated content across multiple web pages, or to hide certain pages from search engines.
Let's explore the meta tags canonical
and robots
that are utilized in these situations.
canonical Link
A canonical
link informs search engines which page is the "official" version when there is duplicated content across multiple pages.
Example:
Canonical link example
<head>
<link rel="canonical" href="https://example.com/original-article" />
</head>
This canonical tag informs search engines that the page "https://example.com/original-article" is the official version among the duplicates.
robots Meta Tag
The robots
meta tag directs search engines to either allow or disallow indexing of certain pages.
When you don't want to share specific documents or information with others, you can use the robots meta tag as follows.
Example:
Robots meta tag example
<head>
<meta name="robots" content="noindex, nofollow" />
</head>
Want to learn more?
Join CodeFriends Plus membership or enroll in a course to start your journey.