net: Index | Files

package publicsuffix

import ""

Package publicsuffix provides a public suffix list based on data from A public suffix is one under which Internet users can directly register names.


Package Files

list.go table.go


var List cookiejar.PublicSuffixList = list{}

List implements the cookiejar.PublicSuffixList interface by calling the PublicSuffix function.

func EffectiveTLDPlusOne Uses

func EffectiveTLDPlusOne(domain string) (string, error)

EffectiveTLDPlusOne returns the effective top level domain plus one more label. For example, the eTLD+1 for "" is "".

func PublicSuffix Uses

func PublicSuffix(domain string) (publicSuffix string, icann bool)

PublicSuffix returns the public suffix of the domain using a copy of the database compiled into the library.

icann is whether the public suffix is managed by the Internet Corporation for Assigned Names and Numbers. If not, the public suffix is privately managed. For example, and are ICANN domains, and are private domains.

Use cases for distinguishing ICANN domains like from private domains like can be found at

Package publicsuffix imports 3 packages (graph) and is imported by 189 packages. Updated 2018-03-20. Refresh now. Tools for package owners.