This is the important bit

function getSiteStatus (url) { var siteStatus = -1; try { var response = UrlFetchApp.fetch(url, { muteHttpExceptions: true, validateHttpsCertificates: false, followRedirects: true }); siteStatus = response.getResponseCode() === 200 ? 200 : -1; } catch(e) {} return siteStatus; }