checkRedirectChain

Overview

A function to follow the redirect chain, if any, for the specified URL

In the video we combine =TRANSPOSE() + =checkRedirectChain() in order to obtain the values in the same row. You can omit the =TRANSPOSE() function in order to obtain every redirect in a new row

Credits cost per execution

This function spends 0 credits per execution

Video example

Arguments

checkRedirectChain accepts one argument:

  • URL: The origin URL where to start following the redirects

Expected output

A list (array) of URLs. Every redirect that can find the function until getting a 200 OK status code.

Text example

checkRedirectChain("http://example.com/path")
// http://example.com/path, https://example.com/path, https://www.example.com/path, https://www.example.com/new-path

Use cases

  • How to control a web migration from Google Sheets

  • Validate that the implemented redirects are working (in bulk)

Last updated