title: How to extract the TLD from the URL in JavaScript
body: <p>I want to extract the TLD from the URL but it's giving me the whole URL instead.
  For example <a href="https://www.google.com.uk" rel="nofollow noreferrer">https://www.google.com.uk</a> -> .com.uk. </p>
  
  <pre><code>$(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!")
      }
  </code></pre>