I want to extract the TLD from the URL but it's giving me the whole URL instead. For example https://www.google.com.uk -> .com.uk.
$(document).on("click", "a", function() {
var href = $(this).attr("href");
alert(href)// It gives me the whole link of website
if(href.search(".com.uk")){
alert("This website is AUTHENTIC!");
}
else
{
alert("Not AUTHENTIC!")
}