use "curl -L" to follow redirects during subdomain check …
also write out http_code to avoid using grep to check for 200