#!/bin/bash

# invoke as ./script.sh LIST OUTLIST

urlcheck() {
    curl --connect-timeout 5 --output /dev/null --silent --head --fail "$1"
}

while read -r domain; do
    if urlcheck "$domain"; then
        echo "$domain" >> "$2"
    fi
done < "$1"

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: