Perhaps you could explain what is not correct and offer a solution? There are hundreds of similar functions on the internet to verify domain names and this is just one that I found most helpful, but I am open to your suggestions, so please comment in detail. Thank you!