Verifying Google Search Console with a TXT record: how to avoid mistakes
Want to see how Google sees your website? Then add your domain to Google Search Console. Google will ask you to prove that the domain is yours, using a TXT record in the DNS. That's a short piece of text attached to your domain name that only the DNS administrator can add. In this article you'll learn how to set up the record correctly and which mistakes are common. 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. You can only verify it with a record in the DNS. - URL prefix: you enter a full address, such as
https://www.example.com/. This only covers addresses that start exactly like that. Here you can also verify with an HTML file, a meta tag, Google Analytics or Google Tag Manager.
Preferably choose a domain property: that way you see everything for your domain in one place.
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, choose your domain and open the DNS tab.
- Click + Add record and choose the type TXT.
- Under Name, enter
@. That's the domain itself. Below the field you'll see the full name: it should show exactly your domain name. - Leave TXT record type set to Plain (free text) and paste the code under Text, without quotation marks.
- Click Save record and then click Verify in Search Console.
You can 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é guide, Managing DNS: adding, editing and deleting records.
Detailed explanation with screenshots: Verifying your domain in My WebOké in the Getting found online guide.
In DirectAdmin
If you manage your DNS in DirectAdmin, open DNS Management, choose your domain and click Add Record. Choose the type TXT. The Name field already contains your domain name followed by a dot, such as example.com.: that's the domain itself, so leave it as it is. Paste the code under Value. See TXT records for verification (Google, Microsoft and others).
The most common mistakes
| Mistake | What happens | How to do it right |
|---|---|---|
| Domain name entered twice | You type example.com in a name field that adds the domain name automatically. The record then ends up on example.com.example.com. | In My WebOké, enter @; in DirectAdmin, leave the pre-filled name as it 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. | Put the record on the domain itself. That 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 as well, the code is no longer correct. | Paste only the code. |
| Incomplete code | A part is missing, or there's a space at the end. | 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 on the same name. |
| Record at the wrong provider | A record only works at the provider your nameservers point to. If they're at Cloudflare, for example, a record in My WebOké does nothing. | First check where your DNS is hosted, for example with Domain health. |
| Someone else's code overwritten | If there's already a google-site-verification= from, for example, your web developer and you replace it, they lose access. | Add a second TXT record. Google searches all records for your code. |
Not working right away?
A new record is usually visible quickly. Google states that a manually added record can take up to two to three days. Try again after fifteen minutes, and otherwise 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. More solutions can be found in Verification not working? Here's how to fix it in the Getting found online guide.
Bing too
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'd still rather verify via the DNS, Bing asks for a CNAME record: the name is a code Bing gives you, and the target is verify.bing.com. In My WebOké, enter only that code under Name, and under Points to enter verify.bing.com. with a dot at the end. See Bing: Add and verify site.
Further reading
- Google: Verify your site 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.
Want to learn more? Take the free Getting found online course, lesson 2.1 Google Search Console: adding and verifying your site.
