fbpx Skip to main content

Have been doing a bit of reading and found this (fairly old post) on Google’s webmaster central blog:

“Can I use a relative path to specify the canonical, such as <link rel=”canonical” href=”product.php?item=swedish-fish” />?

Yes, relative paths are recognized as expected with the <link> tag. Also, if you include a <base> link in your document, relative paths will resolve according to the base URL.”

So, you might also want to add <base> tag to define the address that will be inserted in front of the relative url, however without setting it specifically the current URL in the location bar will be used, so I would typically expect the relative canonicals to operate correctly without it.