Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.


Folders and files

Last commit message
Last commit date

Latest commit



64 Commits

Repository files navigation

Domain Expiration Check Shell Script

A simple shell script to display or notify the user via email about domain status and expiry date.


Use the curl or wget command to grab script as follows:

$ wget
## [ sample domain list for testing purpose ] ##
$ wget 
## [ install it in /usr/local/bin dir ] ##
$ sudo cp -vf /usr/local/bin/domain-check-2
$ sudo chmod +x /usr/local/bin/


Run it as follows:

$ domain-check-2 -d
$ domain-check-2 -d
$ domain-check-2 -f domain-list.txt 

Sample outputs:

Domain                              Registrar                                      Status   Expires     Days Left
----------------------------------- ---------------------------------------------- -------- ----------- ---------              , LLC                               Valid    10-may-2023   2022                          MarkMonitor Inc.                               Valid    20-oct-2018   359                          MarkMonitor Inc.                               Valid    15-mar-2018   140                         MarkMonitor Inc.                               Valid    31-jul-2018   278             , Inc.                              Valid    30-jun-2024   2439                           MarkMonitor Inc. (R84-AFIN)                    Valid    14-Feb-2018   111                        MarkMonitor Inc. (R84-AFIN)                    Valid    23-Jun-2018   240                           MarkMonitor, Inc.                              Valid    18-apr-2018   174                           Markmonitor Inc.                               Valid    11-Jun-2018   228                        Markmonitor Inc.                               Valid    14-Feb-2018   111                           Google                                         Valid    31-may-2018   217                           REG-MARKMONITOR                                Valid    22-jul-2018   269                           Markmonitor, Inc.                              Valid    18-sep-2018   327                           MARKMONITOR, INC.                              Valid    24-Feb-2018   121                           RU-CENTER-RU                                   Valid    04-mar-2018   129                         MarkMonitor Inc                                Valid    19-aug-2018   297                          OVH SAS                                        Valid    14-nov-2018   384                           Google Inc.                                    Valid    02-may-2018   188                           MARKMONITOR, INC.                              Valid    24-Feb-2018   121                        CSC Corporate Dom                              Valid    11-may-2018   197                           MarkMonitor Inc.                               Valid    13-jun-2018   230                           MarkMonitor, Inc.                              Valid    18-apr-2018   174                           RUCENTER-SU                                    Valid    15-oct-2018   354                          MARKMONITOR INC.                               Valid    14-aug-2018   292                             MarkMonitor, Inc (TLDs)                        Valid    20-mar-2025   2702                           MarkMonitor Inc                                Valid    20-oct-2018   359                           DK Hostmaster A/S                              Valid    31-mar-2018   156

Setup Unix/Linux cron job as follows to get email notification to send expiration notices:

@daily /path/to/ -f /path/to/your-domains.txt -e

Getting help

$ -h
Usage: [ -e email ] [ -x expir_days ] [ -q ] [ -a ] [ -h ]
          {[ -d domain_namee ]} || { -f domainfile}

  -a               : Send a warning message through email 
  -d domain        : Domain to analyze (interactive mode)
  -e email address : Email address to send expiration notices
  -f domain file   : File with a list of domains
  -h               : Print this screen
  -s whois server  : Whois sever to query for information
  -q               : Don't print anything on the console
  -x days          : Domain expiration interval (eg. if domain_date < days)