How to: Find out domain expiration date

My friend recently lost her domain name as she forgot to renew it. Now there is no way she can get back the domain name. So how do you find out domain expiration date?

There are 3 simple ways:

By checking the public WHOIS database

Visit whois service here and enter your domain name. You can also use your domain registrar whois service to find out information.

By logging into your domain service providers account

Login to your domain registrar account and list expiring domain. Make sure you set all domains to auto renewal. Finally, make sure your credit card / payment information is upto date to avoid delays.

By using automated shell scripts for Linux /UNIX / Mac OS X

You can grab modified shell script that run as a cron job from your own Mac OS X / Unix computer. This script checks to see if a domain has expired. It can be run in interactive and batch mode, and provides facilities to alarm (email) if a domain is about to expire in advance.

Free Windows Software

If anyone has any information about free domain remainder utility for Windows XP / Vista, please add them in the comments.

Most domain register provides a series of reminder emails to you as the domain name approaches its expiry date. Make sure you whitelist those email address. If domain names are quite important register them for 5-10 years and lock all domain names.

Send mail bash script

Explains how to write a shell script to send an email from command prompt under Linux / UNIX operating systems.

The mail command can be used under Linux or UNIX bash / ksh / csh shell to send an email. To send a message to one or more people, mail can be invoked with arguments which are the names of people to whom the mail will be sent. You are then expected to type in your message, followed by an ‘control-D’ at the beginning of a line. However, using the following syntax one can send email easily:
mail -s ‘Subject’ [email protected] Sample Shell Script

Here is what you need to put in a shell script:

#!/bin/bash
# script to send simple email 
# email subject
SUBJECT="SET-EMAIL-SUBJECT"
# Email To ?
EMAIL="[email protected]"
# Email text/message
EMAILMESSAGE="/tmp/emailmessage.txt"
echo "This is an email message test"> $EMAILMESSAGE
echo "This is email text" >>$EMAILMESSAGE
# send an email using /bin/mail
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE

See also: Sending mail with attachment from command line/shell