Website/domain monitor – Google sheet and Apps Script

Website/Domain monitor

Never miss a “domain expiry” email notification ever again!

One of my websites was recently down for a couple of weeks without me noticing (it looks like the email notification got lost in the post). So to avoid this happening again I have created myself a website monitor using a Google Sheet and Apps Script.

The script runs once a night and does a few simple checks:

  • whether the site is accessible
  • whether the domain will expire soon (“soon” being configurable in the script)
  • whether if the name servers have changed

You can run it manually using “Domain Monitor > Check domains”.

It uses a free WHOIS API developed by Jason Ormand.

There is also a progress log in the Log sheet.

If you do not know your name servers run it with this column empty and then copy over the ones returned (assuming everything is working now).

It only works for international top-level domains like .com and .net, not country specific ones like


  • Take a copy of my sheet
  • Enter your own domains – Delete my domains and list your own (excluding any “www” or “http”) in the sheet
  • Set up the script properties (optional) – Go into the script editor (Tools > Script editor…) and then File > Project Properties > Script Properties. This step is optional, but you will obviously not receive email notifications and/or a link to the results sheet. Here add two rows:
    • EMAIL – with the email address you want the notifications sent to
    • SHEET_URL – the URL of your copy of the GSheet

Set script properties


  • Set up the trigger – Go to “Resources > Current project’s triggers” and add a trigger:
    • to run checkDomains()
    • time-driven
    • at whatever frequency you like – I use daily
    • and at whatever time – I run mine at 1am

Set up trigger


You can also simply copy the script into your own sheet from the gist. There are a couple of things to note if you take this route: