How to verify domain ownership via DNS record with Cloudflare: Google Search Console
Search Console is a great tool from Google that allows you submit site maps, so Google can track and scroll your content faster and more accurate, it shows you errors within your site, like broken links, mobile issues, etc, and it also gives you a bit of analitics, like visits, clicks, impressions in Google, and one of my favorite features, it tells you what keywords people used to find you on search result, long time ago this featuresd used to be part of Google Analytics but now we can get it from the Search Console, so definitely it is great tool for SEO.
If you are using Search Console you might have found a new option to add a domain property which inlcudes the tracking of subdomains, you can actually submit a sitemap for each subdomain! (How to add a sitemap to Google Search Console and appear on Google Search Results)
For this method you will need to verify your domain by adding a txt record to your DNS. If you are using Cloudflare (and you should), this guide will help you from A to Z.
- Log into your Search Console Account and under the menu, at the bottom click on "+ Add property"
- Select Domain and add your domain name, different to URL prefix, it will checl all URL's accross all subdomains.
- On the next step you will need to copy the TXT record, including "google-siteverification" and we will paste it on Clodflare.
- Log in to Cloudflare, select your domain, if you don't have it add your domain.(How to add my domain to Cloudflare) and select a TXT record.
- On the next step, add your domain name on the field "Name" and on the next field "Click to configure" add the whole code (TXT value) that you previously copied from Google Search Console.
- Add the record and wait a few minutes (about 10 minutes) then go back to Search Console and click on "verify" if everything went well you will see the following screen, if not wait a bit longer and try again. If you recently added your domain you might need to wait a few hours.