To speed up the process of checking a large number of pages by server response code, you can use Google Sheets. Instead of manually checking each URL by visiting and viewing the server response code yourself, you need to add a script to the Google Sheet and add a formula to a cell.
To perform the server response status check in Google Sheets, you need to:
- Create a new Google Sheets table.
- In the menu, select the “Extensions” section, and go to “Apps Script”.


- Remove the unnecessary values and add the script.
function getStatusCode(url) {
var response = UrlFetchApp.fetch(url, {muteHttpExceptions:true});
return response.getResponseCode();
} - After adding the script, click on the depicted floppy disk icon to save.
- Next, click the “Run” button.
- In the next step, you will need to grant the script access to your Google account. You will see a warning that Google has not verified this code.
Don’t worry, when adding any script, you need access to your Google account to execute it.
- After granting access to the Google account, close the script editor and return to the spreadsheet.
- In the cell where you want to get the server status code, add
=getStatusCode(A2)(where A2 is the cell containing the URL to be checked).


It is important to always specify the URL in its full format, including the http/https prefix and www, if necessary. Otherwise, you may receive a 301 response code because the function does not have information about the correct URL format.