Redirect Checker
Tests the final URLs of your ads, keywords and sitelinks and reports which ones respond with a redirect (301/302/303/307/308) — redirects slow pages down and can break tracking.
by Nils Rooijmans·nilsrooijmans.com/google-ads-script-check-for-redirects
Overview
A redirecting final URL adds latency, can drop tracking parameters, and sometimes signals an outdated URL that will eventually break. This script fetches every ad, keyword and sitelink final URL with redirect-following disabled, records the HTTP response code, and writes all redirecting URLs (with clicks, so you can prioritize) to a Google Sheet — plus an email summary.
Setup
- 1Create a new blank Google Sheet and copy its URL.
- 2Open your Google Ads account and go to Tools → Bulk Actions → Scripts.
- 3Click the + button to create a new script and paste the code below.
- 4Set SPREADSHEET_URL and EMAIL, authorize (the script needs URL fetch permission), preview, then schedule weekly.
Configuration Variables
| Variable | Default |
|---|---|
SPREADSHEET_URL | (required) |
EMAIL | (required) |
Expected Output
Sheet rows: campaign, ad group, ad id, keyword, sitelink, url, response code, clicks — one row per URL that answers with a 3xx redirect or fails to load.
Notes
Each unique URL is fetched once (UrlFetchApp quotas apply — on very large accounts run it on a schedule and let it work through the account over several runs). Complements the official Link Checker, which looks for broken pages rather than redirects. Lightly updated by chiliad for the current AdsApp runtime.