What Is It?
This enhanced script automatically checks the landing pages that your ads and keywords lead to, and find the ones that lead to 404 error pages. You can also set up the script to find pages that contain certain phrases like 'product not found' etc, and generate a report with URLs that lead to 404 & 500 error pages.
Note: This script does not automatically resume the paused ads.
Why Use It?
With this script, you can:
Avoid sending traffic to non-functional or irrelevant pages, helping you maintain conversion rates and campaign performance.
Monitor landing page health at scale across ads and keywords without manually checking each URL.
Receive alerts only when issues are found, so you can focus on resolving critical errors without unnecessary notifications.
Customize checks based on campaigns, impressions, and specific conditions to control script execution and avoid timeouts.
Detect pages with unwanted messaging, such as “product not found” or “out of stock,” and take corrective action quickly.
Will the script check the URLs of paused items?
The "Check Destination URLs" script will only check landing page URLs of elements that are enabled, and which have gotten some impressions in the last 30 days. This means it will check only keywords and ads with impressions that are currently enabled and located in active ad groups and campaigns.
Optionally you can use the advanced setting called "Check URLs With Zero Impressions" to check the URLs associated with enabled keywords and ads that have not received a single impression in the past 30 days.
If I pick check “All” in the scope, does it mean it'll check site-links URLs as well?
The scope of "all" refers to ads and keywords. If you want to check site-links, you can use the Check Sitelink URL's script.
Will the script overwrite previous reports in the target spreadsheet?
If you select a particular spreadsheet in the settings, the script will overwrite the old data every time the script runs. If you want to save the old data you can choose to create a new spreadsheet every time it runs by putting 'NEW' in the spreadsheet setting.
How is the ‘cost’ column in the spreadsheet calculated?
The system takes into consideration the last 30 days. This is to give you an estimate of how much wasted spend there would have been if the broken URL kept running.
How does the script match the keywords/phrases defined in the settings?
We check every unique final URL for the selected scope (keywords, ads, or both). This can be narrowed down with the campaign name selector, and the script will check for any campaign whose name includes the text (not case sensitive).
Recommendations and Tips
Google Ads has a 30-minute limit on scripts. If the account is very large, the script will time out without checking all the URLs. A workaround to this is to use the 'Campaign Includes' setting to create multiple settings for the same account.
When you run the script the first time, run it in preview mode to see the results. If everything looks good, edit the setting in Optmyzr to not run in preview mode and automatically pause and resume ads/keywords.
Basic Settings
Spreadsheet URL: The script outputs the results onto a Google Spreadsheet. If you want to paste the results into an existing spreadsheet, put in the address of the spreadsheet. The sharing settings for the spreadsheet should be 'anyone with a link'. If you leave "NEW", the script will create a new spreadsheet each time it runs.
Note: If the sharing settings are not correct, the script will not be able to write the URLs it checks to the spreadsheet.
Scope: The script can check URLs at the keyword and ad level. You can choose to check only ad URLs, only keyword URLs, or both. You can specify this in 'Scope'.
Campaign Name Includes: You can choose to run this script for specific campaigns by mentioning the word to filter on. Note: Only one campaign name can be included here.
Campaign Name Excludes: You can choose to run this script excluding specific campaigns by mentioning the word to filter on. Note: Only one campaign name can be included here.
Label for Bad Landing Pages: To easily recognize the landing pages that the script identifies as bad landing pages, you can choose to label them in Google Ads. This is an optional setting.
Disable Email Alert If No Error Found: Selecting this option will only send you an email if the script finds error pages. It won't send you an email each time the script runs.
Send Notification only on 404 Error: This option limits the notifications to only 404 errors. Disabling it will create a notification for any error type.
Advanced Settings
Text To Monitor: Apart from finding 404 Error pages, this script can also check for any specified text such as 'product not found' or 'out of stock'.
Additional Settings: By default, the script only checks URLs that have at least one impression, if you want to check all URLs even those that have zero impressions, select the relevant box. Keep in mind, this may cause the script to timeout if the account is very large.
The Minimum Clicks Required for Keywords and Ads will be 0 by default, though it can be set to any number to decrease the load on the script.
Understanding the Results
The resulting script spreadsheet has multiple tabs, one for each case. You can find the details on what each one means here.
404 Error
When a URL is checked and the response is a 404 error, then it'll be logged here. This error code means that the URL wasn't found, and is incorrect.
No issues
This sheet has all the URLs that returned response codes 200 or 202, and which don't contain any matching text.
LP Content Warnings
When a URL returns a response code 200 or 202, we fetch the entire text of that page and then check for the text from the "text to monitor" fields. If such text is found, it's logged in this sheet.
Not Checked
The URLs that fail to return any response are logged under this issue, as they weren't checked. 500 error codes will also appear here.
Checked
This sheet has all the URLs that were checked and which returned any response codes.
Use Cases
Audit Large Accounts Without Manual Checks
Problem: If you manage a large account, manually checking every landing page is time-consuming and impractical. You may miss critical issues.
Solution: You can automate URL checks across campaigns, ads, and keywords. Use the Campaign Name Includes/Excludes setting to break down large accounts into smaller segments and avoid script timeouts.
Identify Low-Traffic URLs That Haven’t Been Tested
Problem: Some enabled ads or keywords may not receive impressions, leaving their landing pages untested and potentially broken.
Solution: You can enable the Check URLs With Zero Impressions setting to scan all URLs, including those without traffic. This helps you validate pages before they start receiving clicks.


