Pinging Your Website From Your Computer

If you want to keep your website active, and want to ping to your website continuously, what most of the clients and users end up with is that they hire a third-party service to ping their websites. Most of them are costly services. In this post I am going to walk you through creating a batch script on your Windows, that will allow you to ping the website yourself. The code is very simple:
  1. @echo off  
  2. @%SystemRoot%\system32\ping.exe -n 2 www.mywebsite.com  
This code would ping your website (replace mywebsite with your own domain name). This has to run in a command prompt, so follow the following steps to create the script: 
  1. Open Notepad application.
  2. Write this script in it.
  3. Save the script file with extension ".bat" instead of ".txt" one. 
  4. Run the script in the command prompt.
You can later set on the timers that you want for the script to run. You can use it in your .NET applications and trigger it from there.