def domainname(name):
    """Extracts domain name from a fqdn

    :param name: FQDN like www.google.com or www.yahoo.com.
    :type name: str
    :return: domain name like google.com  or yahoo.com.
    :rtype: str
    """
    result = name.split('.')
    result.pop(0)
    return '.'.join(result)
