Interview Question

What are canonical tags?

A canonical link points to the preferred URL for equivalent content.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

A canonical link identifies the preferred URL for duplicate or very similar page content. • It uses `<link rel="canonical" href="...">` in the document `<head>`. • The `href` should be an absolute URL for clear processing across environments. • Search engines treat canonical information as a signal, not a guaranteed redirect or command.

💡 Simple Example

<head><link rel="canonical" href="https://example.com/interview/html/what-is-html"></head>

⚡ Quick Revision

A canonical link points to the preferred URL for equivalent content.