Canonical URL link


Canonical URL tag. Canonical link tag.

HTML canonical link tag redirect

The canonical link does not redirect to the preffred URL, but it can be an alternative to URL redirection for websites that most of the traffic arrives from search engines.

HTML canonical link tag can be used when there are several pages with similar content and you want to tell the search engines which page you prefer to use in the search results.

Canonical link tag can link to the same domain and also cross-domain.

Add the canonical link tag to the old page to link to the new page.

Add the canonical link tag to the pages that you prefer not to get search engines traffic to link to the prefered page.

The canonical link tag should be added in the <head> section.

Example #1

When page has moved we can add canonical link in the old page to notify search engines to reach the new page.

old-page.html:

<!DOCTYPE html>
<html>
<head>
   ...
   <link rel="canonical" href="http://www.mydomain.com/new-page.html">
</head>
<body>
   ...
</body>
</html>

Example #2

When there are several pages with similar content, if we prefer search engines to reach page3.html, we should add canonical link to page3.html in the head section of page1.html and page2.html.

page1.html:

<!DOCTYPE html>
<html>
<head>
   ...
   <link rel="canonical" href="http://www.mydomain.com/page3.html">
</head>
<body>
   ...
</body>
</html>

page2.html:

<!DOCTYPE html>
<html>
<head>
   ...
   <link rel="canonical" href="http://www.mydomain.com/page3.html">
</head>
<body>
   ...
</body>
</html>

 

HTML redirection ►

 


See also


WEB DEVELOPMENT
CONTACT