import tldextract list = tldextract.extract('http://blog.ashiknesin.com/about') domain_name = list.domain + '.' + list.suffix # ashiknesin.com