Skip to main content

How to verify the ownership of a domain using DNS (TXT record)

Learn how to verify a domain using DNS (TXT record).

Nuno Loureiro avatar
Written by Nuno Loureiro
Updated over a month ago

This verification method consists of proving that you have control over the DNS records that point to your website. To do so, create a TXT record with the same FQDN/hostname as your domain and the content provided to you in the verification process. This validation through DNS doesn't involve making changes to the website.


​

Step 1: Add the domain

First, start by adding the domain at Snyk API & Web as follows:

  1. Log in to the Snyk API & Web app.

  2. On the Targets list, click on the Domains tab that appears under the title.

  3. On the next page, click on Add domain.

  4. Type the hostname of your domain and click on Add.

  5. In the next dialog, choose the DNS (TXT) option to verify the ownership of your domain, and click on Next.

You will be presented with the information you need to create the TXT record in your DNS. Don't close the dialog.​
​

Step 2: Create the TXT record in your DNS

In this step, use the information provided in the Verify Domain dialog, and do the following:

  1. Copy the CONTENT.

  2. Insert it as a TXT record in your DNS.
    ​

Step 3: Verify the domain

Now, in the Verify Domain dialog, you can finally click on Verify. After the domain has been verified, you can start scanning!

Common Issues and Mistakes

It might take some time

DNS records might take some time to get updated across all DNS servers. This shouldn't take more than 48 hours though.

CNAME FQDNs and txt records

If your FQDN is a CNAME this verification method will not work. In that case, you'll need to use the file verification, the DNS CNAME verification, the Meta tag verification, or message us for manual verification. This is a limitation of the DNS itself, which does not allow for TXT records in CNAMEs.

If you still need help, don't hesitate to message us or send us an email at [email protected]

Did this answer your question?