Is there a simple way to retrieve a final destination URL after 301/302 redirect?

254 views
Skip to first unread message

Oleg Amirdzhanov

unread,
Feb 14, 2013, 2:24:09 PM2/14/13
to adwords...@googlegroups.com

Greetings,

Does anybody know if there is any simple way to retrieve a final destination URL after 301/302 redirect?  For instance if I'm conducting URL audit and I would use UrlFetchApp.fetch and then getResponseCode and if response code is 301 or 302 I would like to be able to pull final destination URL, so I could parse it, attach trackers and override my keyword's outdated destination URL

Thanks.

Kevin Winter (AdWords Scripts Team)

unread,
Feb 14, 2013, 6:14:50 PM2/14/13
to adwords...@googlegroups.com
Hi,
  This has come up once before.  Unfortunately, UrlFetchApp doesn't provide the ability to detect redirects.  This came up before.

- Kevin Winter
AdWords Scripts Team
Reply all
Reply to author
Forward
0 new messages