How to verify your GitHub organization

3 steps to verify a GitHub organization with a site on WordPress.com

Organizations on GitHub can verify its authenticity and earn a badge by validating a domain. However, GitHub doesn’t offer much help about how to do it in different services. Let’s see how to do it in a site hosted in WordPress.com.

Organization verification on GitHub is simple: it uses a DNS record with a specific name and value. It can be confusing though since different hosting or domain services have different interfaces to write the record with the validation code and in some cases this doesn’t make sense.

Start verifying your GitHub organization

The process to verify your organization begins on GitHub. Go to your organization page (for example, I’d go to github.com/startfunction), and access its Settings. Then click on Verified domains, and click the green button to Add a domain. Now it’s just a matter of following the steps in the wizard that will launch.

You’ll be asked which domain you want to use to verify the GitHub organization and then you’ll reach a screen prompting you to create a TXT record in your DNS configuration with a specific name and value for it.

The TXT record name is as follows:

_github-challenge-<organization>.<domain>.

And here’s one point of confusion: the “.” at the end of the record name. Since this is part of a sentence, it’s not clear if it’s part of the record name or a period ending the sentence. It’s necessary. This is because this identifies a fully qualified domain, a domain name that specifies its exact location in the tree hierarchy of the DNS, and sometimes, a full stop is required at the end. As we’ll see later, we won’t need it if we’re creating the record in WordPress.com since they already take care of this for us.

Copy the code provided by GitHub and leave this tab open in your browser since we’ll come back in a few minutes to click that green Verify domain button.

Add the TXT record in WordPress.com

Now go and manage your site on WordPress.com. Select the site that you want to verify and go to Manage > Domains. Choose your primary domain and go to Update your DNS Records.

Scroll down to the bottom and change the Type dropdown to select a TXT record. Paste the code provided by GitHub that you copied before in the Text field.

Now here’s the tricky part. While GitHub provided you with a long string including the domain, you don’t need all of it. You only need to copy the portion referring to the prefix given by GitHub and the slug of the GitHub organization. You can leave the top level domain out, since WordPress.com already completed it. So you’ll simply write:

_github-challenge.<organization>

Now save it and your new TXT record will be inserted in the list of the other DNS records. When it’s inserted, you’ll see the domain was appended and now it looks just like that provided by GitHub, apart from the final period. Don’t worry, it’s not necessary in this case.

Checking DNS changes and finally verifying

Wait for a couple of minutes to ensure the DNS change was propagated. This is just to be safe. In my case, DNS changes were propagated almost immediately.

There’s a way to check if your DNS changes are ready if you have a *nix system, either a Linux, Unix or macOS. These systems have a dig tool you can access through the command line. You can use it to query the DNS records of your site and see if the new one is already available. Open your command line (in macOS, you can find it in Applications > Terminal) and run this command:

dig _github-challenge-<your org>.<your domain>.com +nostats +nocomments +nocmd TXT

replace in the command your organization name and your domain, and then hit Enter. It will print a list of TXT records. Look for yours here and if it’s in the list, great! It means it’s time to proceed with the final step to verify your GitHub organization.

Go back to the GitHub tab you left open in the browser. Click the green button Verify domain so GitHub checks the new TXT record you added and verifies your organization.

Verify GitHub organization with a WordPress.com site

It’s done! Your organization on GitHub is now verified and its page will be sporting a nice Verified badge.

Advertisements

Leave a Reply