Google Sheets 404 Checker Code
Wordpress tools How to

Check List of URLs for 404 Errors using Google Sheets

AliDropship is the best solution for drop shipping

Editor Scores:

Consumer Scores:

[Total: 5   Average: 2/5]

On this tutorial I’ll cowl methods to bulk examine an inventory of URLs for 404 errors utilizing Google Sheets. The method will likely be so easy that you’ll put the record of URL that you simply need to examine for 404 or every other standing code, and shortly you’ll get standing code for all of the URLs. I’ve been utilizing this technique since previous couple of days to examine round 11,000 URLs in bulk for 404 errors, and it has been working very properly. Takes just some minutes to examine so many URLs as these run in parallel utilizing Google’s huge infrastructure.

So, in case you are a marketer, a blogger, a website positioning specialist, or anybody with a must bulk examine large record of URLs for 404 errors, this technique is as simple because it will get. After all, there are instruments on the market that may most likely do a greater job (like, Screaming Frog), however what I needed was one thing that runs on-line and can be utilized by anybody at no cost, and Google Sheets precisely does that. So, with out a lot ado, let’s see methods to bulk examine record of URLs for 404 errors.

Check 404 Errors in Google Sheets

Within the above screenshot you possibly can see my record of URLs on the left facet, and their standing code on the fitting facet. The primary cell within the final column exhibits the formulation that I’ve utilized.

The best way to Test Listing of URLs for 404 Errors utilizing Google Sheets:

To examine our URLs, we’re going to add some code to Google Sheets. However don’t fear, it’s amazingly easy. And also you don’t must have any technical data. I’m going to stroll you thru the precise steps required. Additionally, this setup is required for the primary time solely, after which you possibly can preserve utilizing the identical sheet once more with no must re-apply these steps.

Step 1: Create a brand new Google Sheets.

Step 2: We’ll add the code through Script Editor. For that, click on on Instruments, after which Script Editor.

Google Sheets Script Editor Menu

Step 3: This may open a clean script Editor window, as proven beneath. Take away all of the code that’s current in it.

Google Sheets Blank Script Editor Window

Step 4: Now comes the primary half. Copy all of the code beneath, and add it to Google Sheets.

perform HTTPResponse( uri )
var response_code ;
attempt {
response_code = UrlFetchApp .fetch( uri ) .getResponseCode() .toString() ;
catch( error ) {
response_code = error .toString() .match( / returned code (ddd)./ )[1] ;
lastly {
return response_code ;

As soon as added, your Script Editor ought to seem like screenshot beneath. Go forward and click on on the Save button to save lots of the script.

Google Sheets 404 Checker Code

Now you’re all set.

Step 5: Shut the Script Editor. Return to your Google Sheet that you simply created. Now, in any column, add the record of URLs that you simply need to examine for 404 errors or every other standing code. Subsequent to that, add this perform:

=httpresponse(cell that has URL)

For instance, in case your URL is in cell A2, then above perform will learn =httpresponse(A2)

This may change the perform with HTTP standing code. The URLs which are positive with give 200 standing code, whereas those which have downside would possibly give codes like 404, 500, 400 and so forth. You’ll be able to see record of HTTP Standing Codes here.

Do the identical for all of the URLs. As I stated, I’ve been utilizing this with greater than 11,000 URLs, and it really works completely positive.

Do be aware that when you add the perform, nothing would possibly occur instantly. Give it a while to return the consequence.

Listed here are a couple of ideas primarily based on my expertise of working with an enormous record of URLs:

  • In case you open that Google Sheets once more, it would once more begin fetching contemporary standing code information for all of the URLs, which could make the sheet unresponsive for some time. So, as a observe, as soon as I’ve all the information I would like, I take away the formulation from the column after which shut the sheet, in order that subsequent time I open, it opens instantly.
  • Google Sheets recalculates the worth of the perform steadily. This would possibly occur even when nothing adjustments. Throughout that point, the sheet would possibly change into unresponsive. So, the most suitable choice is that when the standing codes for all of the URLs have been discovered, copy them to an Excel.
  • For the explanation talked about above, don’t attempt to do any additional calculation on these URLs in Google Sheets. For instance, it may not be a good suggestion to create pivot desk and so forth. As a substitute, copy the information from this Google sheet to a different Google Sheet or Excel, and carry out any additional calculations there. Use this sheet to only get standing codes of URLs.


This Google Sheet is a strong device in my arsenal now, because it has saved me lot of time in checking large lists for 404 or every other errors. It doesn’t do any superior features, like checking redirect URLs and so forth., however that’s not what that is meant for. The only goal of making such a sheet was to have the ability to shortly bulk examine record of URLs for 404 errors, and that’s precisely what this does.

Do you utilize every other technique to examine URLs for 404 errors? Let me know within the feedback beneath.

Supply: StackOverflow.