The .gov top-level domain exists so that the online services of U.S.-based government organizations are easy to identify on the internet. In support of that goal, the .gov registry publishes information about our domains.
This repository contains the official, full list of registered domains in the .gov zone. The U.S. Government's executive, legislative, and judicial branches are represented, as are many state, territory, tribal, city, and county governments in the United States.
Three files are updated daily (when there is activity):
- gov.txt — a copy of the .gov zone file
- current-full.csv — a CSV of all domains in the zone, including federal domains
- current-federal.csv — a CSV of only federal domains in the zone
current-full.csv and current-federal.csv contain the same registered domains as the zone file, but instead of name server records they detail the registrant organization. They include all domains in the "Ready" and "On hold" states of our registrar.
Each file lists the "second-level domains" (e.g., get.gov) that are registered in the .gov zone; they do not list every hostname (e.g., manage.get.gov) in use in the .gov namespace. This repo hosts several other files that include .gov hostnames, though they are not complete.
Note that not all registered domains offer an online service (e.g., a website, an email server) at the domain.
This repo doesn't accept pull requests on the zone file or current-{full,federal}.csv. If you manage a domain in these files and you notice that metadata about it is incorrect, log in to the .gov registrar to correct it.
-
If you use any of this data or just have a question, let us know by opening an issue.
-
Find a security or privacy issue on one of these domains? Review our security policy.
- Accept the Risk and Continue: Measuring the Long Tail of Government https Adoption. Sudheesh Singanamalla, Esther Han Beol Jang, Richard Anderson, Tadayoshi Kohno, and Kurtis Heimerl. 2020. In Proceedings of the ACM Internet Measurement Conference (IMC '20). Association for Computing Machinery, New York, NY, USA, 577–597. DOI
- Lauren Ancona made a geocoded map of .gov domains:
This repo publishes a small data browser via GitHub Pages so that the CSV files named above can be searched, sorted, and filtered without needing to clone or download anything.
Key things to know:
mainis the canonical source of truth for index.html and the CSVs.- The repository is configured to deploy to GitHub Pages from a branch,
gh-pages(notmain). - The
gh-pagesbranch is a deploy target only — it is managed exclusively by GitHub Actions, and developers shouldn't generally merge or interact withgh-pagesdirectly.
.github/workflows/deploy.ymlis triggered when there are changes toindex.htmlor one of the.csvfiles onmain. The workflow syncs those changes to thegh-pagesbranch to be deployed. This workflow can also be triggered manually via Run workflow in the Actions tab..github/workflows/branch-preview.ymlpublishes a temporary preview of any other branch in this repository, and removes it automatically when the branch is deleted.
- Branch off
main, make changes, and push that branch to the repo. branch-preview.ymlruns automatically. Check the Actions tab for the run, and open its summary to get a link to the preview.- Every push to your branch will update the same preview link in-place.
- Open a PR when you're ready. Reviewers can use the same link to see a rendered page, not just the diff.
- Merge the PR to
mainonce approved. - On the merge to
main,deploy.ymlsyncs the changes to thegh-pagesbranch and it's deployed to the GitHub Pages site. - Deleting your branch (or letting GitHub do it after merge) cleans up the preview automatically.
- Fork PRs don't get a preview — the preview workflow only supports branches within this repo, not PRs from a fork.
- Orphaned preview cleanup is manual — if a preview is left behind outside of a normal branch deletion, it needs to be manually removed from the
gh-pagesbranch usinggit rmfor the folder where the preview is.
