{"id":7679,"date":"2020-07-18T10:09:22","date_gmt":"2020-07-18T07:09:22","guid":{"rendered":"https:\/\/rockmedia.gr\/?p=7679"},"modified":"2022-12-02T08:05:41","modified_gmt":"2022-12-02T06:05:41","slug":"the-tag-link-relcanonical-appears-more-than-once-in-the-document","status":"publish","type":"post","link":"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/","title":{"rendered":"\u201cThe tag \u2018link rel=canonical\u2019 appears more than once in the document\u201d"},"content":{"rendered":"<p>In a client&#8217;s website, I received the following error from the Google Search Console, while inspecting AMP URLS:<\/p>\n<p>\u201cThe tag \u2018link rel=canonical\u2019 appears more than once in the document\u201d.<\/p>\n<p>The website is a publisher website and uses two plugins to accommodate ADS, both in Desktop and AMP (Mobile) version. Those 2 plugins are designed by the same company and work together perfectly.<\/p>\n<ol>\n<li>Better ADs<\/li>\n<li>Better AMP<\/li>\n<\/ol>\n<p>The website also uses YOAST SEO for indexing the pages.\u00a0 The problem is that both Better AMP and YOAST SEO were adding canonical URL to the AMP code.<\/p>\n<p>I found an <a href=\"https:\/\/www.whoisabhi.com\/2020\/05\/solvedamp-error-the-tag-link-relcanonical-appears-more-than-once-in-the-document\/\">article<\/a> that demonstrates exactly what happens if you inspect the page. The double canonical URL\u00a0 is displayed in the following image.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7680\" src=\"https:\/\/rockmedia.gr\/wp-content\/uploads\/2020\/07\/the-amp-canonical-error.jpg\" alt=\"\" width=\"1024\" height=\"438\" srcset=\"https:\/\/rockmedia.gr\/wp-content\/uploads\/2020\/07\/the-amp-canonical-error.jpg 1024w, https:\/\/rockmedia.gr\/wp-content\/uploads\/2020\/07\/the-amp-canonical-error-300x128.jpg 300w, https:\/\/rockmedia.gr\/wp-content\/uploads\/2020\/07\/the-amp-canonical-error-768x329.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>However, the solution displayed in the article did not work for me, so I was forced to deactivate Better AMP.\u00a0 I downloaded the plugin <a href=\"https:\/\/wordpress.org\/plugins\/accelerated-mobile-pages\/\">&#8220;AMP for WP&#8221;<\/a>.<\/p>\n<p>After initial setup and customization, I assigned Google Search Console to re-inspect my AMP URLs. The problem was solved.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a client&#8217;s website, I received the following error from the Google Search Console, while inspecting AMP URLS: \u201cThe tag \u2018link rel=canonical\u2019 appears more than once in the document\u201d. The website is a publisher website and uses two plugins to accommodate ADS, both in Desktop and AMP (Mobile) version. Those 2 plugins are designed by [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[60],"tags":[],"class_list":["post-7679","post","type-post","status-publish","format-standard","hentry","category-seo"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u201cThe tag \u2018link rel=canonical\u2019 appears more than once in the document\u201d<\/title>\n<meta name=\"description\" content=\"I was using Better AMP and YOAST SEO for a client&#039;s website. The problem is that both Better AMP and YOAST SEO were adding canonical URL to the AMP code.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u201cThe tag \u2018link rel=canonical\u2019 appears more than once in the document\u201d\" \/>\n<meta property=\"og:description\" content=\"I was using Better AMP and YOAST SEO for a client&#039;s website. The problem is that both Better AMP and YOAST SEO were adding canonical URL to the AMP code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/\" \/>\n<meta property=\"og:site_name\" content=\"RockMedia\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/rockmedia.gr\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-18T07:09:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-02T06:05:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/rockmedia.gr\/wp-content\/uploads\/2020\/07\/the-amp-canonical-error.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"438\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Alex Zandros\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alex Zandros\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/\"},\"author\":{\"name\":\"Alex Zandros\",\"@id\":\"https:\/\/rockmedia.gr\/#\/schema\/person\/c63968a433d0fc1ea2754c1380fcc68c\"},\"headline\":\"\u201cThe tag \u2018link rel=canonical\u2019 appears more than once in the document\u201d\",\"datePublished\":\"2020-07-18T07:09:22+00:00\",\"dateModified\":\"2022-12-02T06:05:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/\"},\"wordCount\":179,\"publisher\":{\"@id\":\"https:\/\/rockmedia.gr\/#organization\"},\"image\":{\"@id\":\"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/rockmedia.gr\/wp-content\/uploads\/2020\/07\/the-amp-canonical-error.jpg\",\"articleSection\":[\"SEO\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/\",\"url\":\"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/\",\"name\":\"\u201cThe tag \u2018link rel=canonical\u2019 appears more than once in the document\u201d\",\"isPartOf\":{\"@id\":\"https:\/\/rockmedia.gr\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/rockmedia.gr\/wp-content\/uploads\/2020\/07\/the-amp-canonical-error.jpg\",\"datePublished\":\"2020-07-18T07:09:22+00:00\",\"dateModified\":\"2022-12-02T06:05:41+00:00\",\"description\":\"I was using Better AMP and YOAST SEO for a client's website. The problem is that both Better AMP and YOAST SEO were adding canonical URL to the AMP code.\",\"breadcrumb\":{\"@id\":\"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/#primaryimage\",\"url\":\"https:\/\/rockmedia.gr\/wp-content\/uploads\/2020\/07\/the-amp-canonical-error.jpg\",\"contentUrl\":\"https:\/\/rockmedia.gr\/wp-content\/uploads\/2020\/07\/the-amp-canonical-error.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/rockmedia.gr\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u201cThe tag \u2018link rel=canonical\u2019 appears more than once in the document\u201d\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/rockmedia.gr\/#website\",\"url\":\"https:\/\/rockmedia.gr\/\",\"name\":\"RockMedia\",\"description\":\"Web Design Services\",\"publisher\":{\"@id\":\"https:\/\/rockmedia.gr\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/rockmedia.gr\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/rockmedia.gr\/#organization\",\"name\":\"RockMedia\",\"url\":\"https:\/\/rockmedia.gr\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rockmedia.gr\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/rockmedia.gr\/wp-content\/uploads\/2026\/02\/rockmedia-organizational-logo.webp\",\"contentUrl\":\"https:\/\/rockmedia.gr\/wp-content\/uploads\/2026\/02\/rockmedia-organizational-logo.webp\",\"width\":950,\"height\":512,\"caption\":\"RockMedia\"},\"image\":{\"@id\":\"https:\/\/rockmedia.gr\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/rockmedia.gr\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/rockmedia.gr\/#\/schema\/person\/c63968a433d0fc1ea2754c1380fcc68c\",\"name\":\"Alex Zandros\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/f8fc87907765204796ee6a1b88811c22e49c19feca365ad0e4f89fe61eeaca5f?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f8fc87907765204796ee6a1b88811c22e49c19feca365ad0e4f89fe61eeaca5f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f8fc87907765204796ee6a1b88811c22e49c19feca365ad0e4f89fe61eeaca5f?s=96&d=mm&r=g\",\"caption\":\"Alex Zandros\"},\"description\":\"Website Designer &amp; Full Stack Developer\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u201cThe tag \u2018link rel=canonical\u2019 appears more than once in the document\u201d","description":"I was using Better AMP and YOAST SEO for a client's website. The problem is that both Better AMP and YOAST SEO were adding canonical URL to the AMP code.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/","og_locale":"en_US","og_type":"article","og_title":"\u201cThe tag \u2018link rel=canonical\u2019 appears more than once in the document\u201d","og_description":"I was using Better AMP and YOAST SEO for a client's website. The problem is that both Better AMP and YOAST SEO were adding canonical URL to the AMP code.","og_url":"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/","og_site_name":"RockMedia","article_publisher":"https:\/\/www.facebook.com\/rockmedia.gr","article_published_time":"2020-07-18T07:09:22+00:00","article_modified_time":"2022-12-02T06:05:41+00:00","og_image":[{"width":1024,"height":438,"url":"https:\/\/rockmedia.gr\/wp-content\/uploads\/2020\/07\/the-amp-canonical-error.jpg","type":"image\/jpeg"}],"author":"Alex Zandros","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Alex Zandros","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/#article","isPartOf":{"@id":"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/"},"author":{"name":"Alex Zandros","@id":"https:\/\/rockmedia.gr\/#\/schema\/person\/c63968a433d0fc1ea2754c1380fcc68c"},"headline":"\u201cThe tag \u2018link rel=canonical\u2019 appears more than once in the document\u201d","datePublished":"2020-07-18T07:09:22+00:00","dateModified":"2022-12-02T06:05:41+00:00","mainEntityOfPage":{"@id":"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/"},"wordCount":179,"publisher":{"@id":"https:\/\/rockmedia.gr\/#organization"},"image":{"@id":"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/#primaryimage"},"thumbnailUrl":"https:\/\/rockmedia.gr\/wp-content\/uploads\/2020\/07\/the-amp-canonical-error.jpg","articleSection":["SEO"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/","url":"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/","name":"\u201cThe tag \u2018link rel=canonical\u2019 appears more than once in the document\u201d","isPartOf":{"@id":"https:\/\/rockmedia.gr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/#primaryimage"},"image":{"@id":"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/#primaryimage"},"thumbnailUrl":"https:\/\/rockmedia.gr\/wp-content\/uploads\/2020\/07\/the-amp-canonical-error.jpg","datePublished":"2020-07-18T07:09:22+00:00","dateModified":"2022-12-02T06:05:41+00:00","description":"I was using Better AMP and YOAST SEO for a client's website. The problem is that both Better AMP and YOAST SEO were adding canonical URL to the AMP code.","breadcrumb":{"@id":"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/#primaryimage","url":"https:\/\/rockmedia.gr\/wp-content\/uploads\/2020\/07\/the-amp-canonical-error.jpg","contentUrl":"https:\/\/rockmedia.gr\/wp-content\/uploads\/2020\/07\/the-amp-canonical-error.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/rockmedia.gr\/en\/the-tag-link-relcanonical-appears-more-than-once-in-the-document\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rockmedia.gr\/en\/"},{"@type":"ListItem","position":2,"name":"\u201cThe tag \u2018link rel=canonical\u2019 appears more than once in the document\u201d"}]},{"@type":"WebSite","@id":"https:\/\/rockmedia.gr\/#website","url":"https:\/\/rockmedia.gr\/","name":"RockMedia","description":"Web Design Services","publisher":{"@id":"https:\/\/rockmedia.gr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rockmedia.gr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/rockmedia.gr\/#organization","name":"RockMedia","url":"https:\/\/rockmedia.gr\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rockmedia.gr\/#\/schema\/logo\/image\/","url":"https:\/\/rockmedia.gr\/wp-content\/uploads\/2026\/02\/rockmedia-organizational-logo.webp","contentUrl":"https:\/\/rockmedia.gr\/wp-content\/uploads\/2026\/02\/rockmedia-organizational-logo.webp","width":950,"height":512,"caption":"RockMedia"},"image":{"@id":"https:\/\/rockmedia.gr\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/rockmedia.gr"]},{"@type":"Person","@id":"https:\/\/rockmedia.gr\/#\/schema\/person\/c63968a433d0fc1ea2754c1380fcc68c","name":"Alex Zandros","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f8fc87907765204796ee6a1b88811c22e49c19feca365ad0e4f89fe61eeaca5f?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f8fc87907765204796ee6a1b88811c22e49c19feca365ad0e4f89fe61eeaca5f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f8fc87907765204796ee6a1b88811c22e49c19feca365ad0e4f89fe61eeaca5f?s=96&d=mm&r=g","caption":"Alex Zandros"},"description":"Website Designer &amp; Full Stack Developer"}]}},"_links":{"self":[{"href":"https:\/\/rockmedia.gr\/en\/wp-json\/wp\/v2\/posts\/7679","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rockmedia.gr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rockmedia.gr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rockmedia.gr\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rockmedia.gr\/en\/wp-json\/wp\/v2\/comments?post=7679"}],"version-history":[{"count":0,"href":"https:\/\/rockmedia.gr\/en\/wp-json\/wp\/v2\/posts\/7679\/revisions"}],"wp:attachment":[{"href":"https:\/\/rockmedia.gr\/en\/wp-json\/wp\/v2\/media?parent=7679"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rockmedia.gr\/en\/wp-json\/wp\/v2\/categories?post=7679"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rockmedia.gr\/en\/wp-json\/wp\/v2\/tags?post=7679"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}