Overview
Google requires domain ownership verification for some of the services they offer. If you have registered your domain, manage your DNS, or host your site with DreamHost, there are several options Google provides to verify your domain name as described in Google’s documentation on domain verification.
You can use any method mentioned below. It's also recommended to add more than one to ensure your site remains verified in case a method is accidentally removed.
Google site verification is different from your Google Analytics tracking ID#. View the following article for information on how to add your Analytics tracking code to your site:
Method 1 — Uploading an HTML file
This method downloads an HTML file from your Google console and uploads it to your DreamHost website. To use this method, your site must be hosted at DreamHost.
- Log into your Google Search Console.
- You are presented with two options.
- Enter your domain as a new property in the URL prefix field. Make sure to include https:// before the domain name.
- Click the HTML file option from the list.
- Click to download the HTML file to your computer.
- Upload the file to your site via FTP.
- Back in your Google console, click the VERIFY button.
Method 2 — Add a meta tag to your homepage
This method adds a line of code to your site's homepage file. To use this method, your site must be hosted at DreamHost and you must be able to edit the HTML code of your site.
- Log into your Google Search Console.
- You are presented with two options. Enter your domain as a new property in the URL prefix field. Make sure to include https:// before the domain name.
- Click the HTML tag option from the list.
- Click the COPY button to copy the meta tag code.
- Log into your site via FTP or SSH.
- Edit your homepage HTML file (usually the index.html file) via FTP or SSH.
- In the <head> section of the HTML file, paste in the meta tag line.
- Save the file.
- Back in your Google console, click the VERIFY button.
Add Google Analytics code
This method adds Google Analytics code to your site. To use this option, you must be an administrator on the Google Analytics account. You can use either your analytics.js or gtag.js snippet.
- Log into your Google Search Console.
- You are presented with two options.
- Enter your domain as a new property in the URL prefix field. Make sure to include https:// before the domain name.
- Click the Google Analytics option.
- Click the analytics.js or gtag.js links for instructions on how to locate this code snippet.
- Log into your site via FTP or SSH.
- Edit your homepage HTML file (usually the index.html file) via FTP or SSH.
- In the <head> section of the HTML file, paste in the analytics code snippet.
- Save the file.
- Back in your Google console, click the VERIFY button.
Method 4 — Add a TXT record
This method adds a DNS record to your DreamHost panel. You must first log into your Google search console to retrieve the record to verify your site.
This method requires that your domain is using DreamHost’s nameservers, but you do not need to have an active hosting plan to verify your domain using this method.
Retrieve your TXT record in your Google console
- Log into your Google Search Console.
- You are presented with two options.
- Enter your domain as a new property in the Domain field. You do not need to add https:// before the domain name.
- Click the CONTINUE button.
- A popup displays with code to create a TXT record.
- Click the COPY button to copy the Google TXT record.
Adding the TXT record to your DreamHost panel
- Navigate to the Manage Websites page.
- Click the Manage button to open the Domain Settings page, which allows you to adjust various settings for your site.
- Click the DNS tab.
- Click the Add Record button.
- Click the Add button in the TXT record section.
- Leave the Host field blank.
- Enter the Google code into the TXT Value field.
- Click the Add Record button to save.
- Click the Add Record Now! button to save this record.
- Back in your Google console, click the Verify button.
At first, you may see the verification failed because the record has not updated online yet. This record could take up to 4hrs to propagate online, but it's usually available sooner.
Check back in a few hours and Google will verify the TXT record.
CNAME record
This method adds a DNS record to your DreamHost panel. You must first log into your Google search console to retrieve the record to verify your site.
This method requires that your domain is using DreamHost’s nameservers, but you do not need to have an active hosting plan to verify your domain using this method.
Google provides you with one record consisting of two parts.
- CNAME Label / Host: 1234abcd.example.com
- CNAME Destination / Target: ab-cdefghijk.dv.googlehosted.com
This example adds the CNAME value of blog.example.com.
Add your domain as a property in your Google console
This step is only necessary if you have not already added your domain as a property.
- Log into your Google Search Console.
- You are presented with two options.
- Enter your domain as a new property in the Domain field. You do not need to add https:// before the domain name.
- Click the CONTINUE button. A popup displays with code to create a TXT record.
- Click the Verify later button.
Generate a CNAME record in Webmaster Central
- Open Webmaster Central.
- Click the ADD A PROPERTY button.
- Enter your domain URL.
- Click Continue.
- In the dropdown menu titled Select your domain registrar or provider, select Other at the bottom. A TXT record displays again.
- Under Having trouble? Try an alternate option, select Add a CNAME record.
- One CNAME record consisting of two parts displays. You must now add this record to your DreamHost panel.
Adding the CNAME record to your DreamHost panel
- Navigate to the Manage Websites page.
- Click the Manage button to open the Domain Settings page, which allows you to adjust various settings for your site.
- Click the DNS tab.
- Click the Add Record button.
- Click the Add button in the CNAME record section.
- In the Host field, enter the CNAME Label text.
Do not add the period at the end as shown in the Google console.
Do not add the primary domain printed in the CNAME Label field. For example, if you are adding this for a subdomain such as blog.example.com, only copy in the CNAME Label and subdomain portion while excluding the primary domain of example.com.
For example, in the image above, the full record is:
-
##########.blog.example.com
You would then only enter ##########.blog into the Host field.
-
- In the Points to field, enter the CNAME Destination text.
- Click the Add Record button to save.
- Click the Add Record Now! button to save this record.
- Back in your Google console, click the Verify button.
At first, you may see the verification failed because the record has not updated online yet. This record could take up to 4hrs to propagate online, but it's usually available sooner.
Check back in a few hours and Google will verify the TXT record.