Verifying Google Search Console with a TXT record: how to avoid mistakes
If you want to see how Google sees your website, you add your domain to Google Search Console. Google will then ask you to prove that the domain is yours, with a TXT record in the DNS. That's a piece of text next to your domain name that only the DNS administrator can place. In this article you'll read how to set the record correctly and which mistakes commonly occur. We use example.com as an example.
Domain or URL prefix?
Search Console has two types of property (that's what a site is called there):
- Domain: you enter
example.com, withouthttps://and withoutwww. This covers all subdomains and both http and https. Verification is only possible with a record in the DNS. - URL prefix: you enter a complete address, such as
https://www.example.com/. This only covers addresses that start exactly like this. Here it's also possible with an html file, a meta tag, Google Analytics, or Google Tag Manager.
Preferably choose a domain property: then you see everything about your domain at once.
Adding the TXT record in My WebOké
- In Search Console, choose Add property, enter your domain name under Domain, and copy the entire code, such as
google-site-verification=Ab12Cd34.... - Log in to My WebOké, go to My Domains, select your domain, and open the DNS tab.
- Click + Add record and choose the type TXT.
- Enter
@in the Name field. That's the domain itself. Below the field is the full name: it should show exactly your domain name. - Paste the code in Value, without quotation marks.
- Click Save record and then click Verify in Search Console.
Read more about the DNS window in Managing DNS records in My WebOké (with examples for CNAME, TXT, and external services) and in the WebOké manual, Managing DNS: adding, changing, and deleting records.
In DirectAdmin
If you manage DNS in DirectAdmin, open DNS Management, select your domain, and click Add Record. Choose the type TXT. The Name field already shows your domain name followed by a period, such as example.com.: that's the domain itself, leave it as is. Paste the code in Value. See TXT records for verification (Google, Microsoft, and others).
The most common mistakes
| Mistake | What happens | How to do it right |
|---|---|---|
| Domain name doubled | You type example.com in a name field that already appends the domain name itself. The record then ends up at example.com.example.com. | In My WebOké, enter @; in DirectAdmin, leave the pre-filled name as is. Check the full name below the field. |
| Record on www | A record on www.example.com doesn't count for the domain property example.com. | Place the record on the domain itself. This also covers the subdomains, but not the other way around. |
| Quotation marks | The panel adds quotation marks around the value itself. If you type them around it too, the code is no longer correct. | Only paste the code. |
| Incomplete code | A piece is missing, or there's a space after it. | Copy the entire line, including google-site-verification=. |
| Code in the SPF record | The SPF record (starts with v=spf1) is for your email. The Google code doesn't belong there. | Create a separate TXT record. Multiple TXT records can exist under the same name. |
| Record with the wrong party | A record only works with the party your nameservers point to. If those are, for example, at Cloudflare, then a record in My WebOké does nothing. | First check where your DNS is located, for example with Domain health. |
| Someone else's code overwritten | If there's already a google-site-verification= from, for example, your website builder, and you replace it, they lose access. | Add a second TXT record. Google searches among all records for your code. |
Not working right away?
Usually a new record becomes visible quickly. Google states that a manually added record can take up to two to three days. Try again after a quarter of an hour, and if not, the next day. Want to see for yourself what's in the DNS? Look up the TXT records as described in Looking up DNS yourself with nslookup, dig, and online tools.
Also with Bing
If your site is already in Search Console, you can import it into Bing Webmaster Tools. Bing then verifies the site itself and takes your sitemaps along; you don't need to add anything to the DNS. If you still want to verify via the DNS, Bing asks for a CNAME record: the name is a code that Bing gives you, the destination is verify.bing.com. In My WebOké, enter only that code in Name, and verify.bing.com. with a period at the end in Points to. See Bing: Add and verify site (English).
Further reading
- Google: Verify your site's ownership
- Google: Add a website property
- Submitting your website to search engines (Google and Bing)
Want to know how TXT records work? Read the lesson TXT records and domain verification from the free DNS course.
