I have a photo sharing site. I inserted the canonical tag on header ( i have common header section for every page) of index page. but all pages show the same tag.
How can i implement canonical tag each page?
Webmasters Stack Exchange is a question and answer site for pro webmasters. It only takes a minute to sign up.
Sign up to join this communityI have a photo sharing site. I inserted the canonical tag on header ( i have common header section for every page) of index page. but all pages show the same tag.
How can i implement canonical tag each page?
Edit: if you want to use canonical on every page, you can do it with Google Tag Manager.
There is no point on using canonical tag among all the site. You should only use it on pages with duplicate content.
For example, if you have http://example.com and http://example.com/index.php you should add the following tag in the page header of index.php.
<link rel="canonical" href="http://example.com" />
Searchers will discard http://example.com/index.php version. If you have http://example.com/products and http://example.com/poducts/sorted you should add at both pages:
<link rel="canonical" href="http://example.com/products" />