Skip to content
Advertisement

Bit.ly API call hitting original URL before/after creating short url

I’m generating Bit.ly short url with v3 api. In original URL I have some DB action after hitting it. But when I generates the bit.ly url, it automatically hit the original URL.

Check my below code of bit.ly api call.

JavaScript

Can we avoid automatic URL call from bit.ly?

Advertisement

Answer

Bitly does fetch the long URL of a Bitlink to retrieve page title and related information. Our requests respect the robots.txt standard (http://www.robotstxt.org).

If you wish to request our systems stop making these requests, you may do so by updating your robots.txt file on the appropriate domain. Note that we do cache a site’s robots.txt for 24 hours, so it will take a day before the change takes effect.

The robots.txt stanza to disable this behavior is:

JavaScript

Also I’d recommend updating to V4 of our API as it is the latest and greatest: https://dev.bitly.com

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement