refined code relating to IsWebsiteOffline