-1

I can use the bit.ly for shorten url in canonical? In terms of seo, right?

for example :

<link rel="canonical" href="<?php echo $post->og('bitly'); ?>" />

and

<meta property="og:url" content="<?php echo $post->og('bitly'); ?>" />

or

<link rel="canonical" href="<?php echo $post->og('url'); ?>" />


url : http://domain/post/title

bitly: http://bit.ly/3tcJjx

Which is correct?

Thank

ali smith
  • 93
  • 2
  • 2
  • 9
  • Facebook tries to scrape the “final” URL. So giving the bit.ly URL as `og:url` will lead to FB requesting that, seeing that it redirects elsewhere, request the new target – and that refers to the bit.ly URL again, so this will end up in an endless redirect (which the debug tool will also tell you). – CBroe Mar 11 '13 at 13:37
  • @CBroe My question is about canonical, I can use the bit.ly for shorten url in canonical? Google will accept? – ali smith Mar 11 '13 at 14:30

1 Answers1

0

You cannot set the canonical URL to a shortened URL or any URL that redirects.

In many ways, Google sees a canonical as equivalent to a redirect. When you specify a canonical URL, it tells Googlebot, "Don't index the content on this URL, go here and index the content here instead." Then when Google gets to bit.ly, it finds that it redirects back and heads right back. The logic is that of an infinite redirect.

Your canonical URL must be a URL that actually contains the content. It cannot be a URL that redirects to the content.

Stephen Ostermiller
  • 23,933
  • 14
  • 88
  • 109