Question
Can I verify my subdomain to be used in Google Search Console?
Answer
You can verify your subdomain to be used in Google Search Console by linking your account to Google Analytics. This way you avoid customizing the theme and all you need to do is to enable Google Analytics.
To link your account to Google Analytics
- Go to www.google.com/analytics and set up a property within your Google Analytics account for your subdomain.
- Copy and add the tracking ID (UA-XXXXXXXX-X) to the Help Center as described in Adding the tracking ID to the Help Center.
- Go back to Google Search Console and add a new property. As you are only able to add prefixes, we recommend the following:
http://YOURSUBDOMAIN.zendesk.com
andhttps://YOURSUBDOMAIN.zendesk.com (plus any segmenting for languages)
- Verify your site ownership and follow the prompts.
Note: In the steps Google provides, it states you need to embed the snippet of code they provide. Steps 1 and 2 already accomplish this automatically for you.
For more information about best practices on attachments and security see the articles below.
6 Comments
Hi! Thanks for the guide! Actually I'm getting this message from Search Console when I try to verify my property. It seems you are putting the analytics script in a different place than expected by Google. They claim that it must by inside the <head> tag.
I have the same problem when trying to verify ownership through Google Analytics.
Am I missing something or ist this article misleading or outdated?
Hi Martin! Just to make sure, have you implemented your GA tracking code as outlined here? Or are you placing the code on another page(s)?
Hey Madison! Yes, I pasted my Google Analytics tracking code in Zendesk Guide as described in https://support.zendesk.com/hc/en-us/articles/205402318. That is the only place I'm using the code.
At first I thought it might have something to do with the fact that I am using a subdomain of my own domain as described here: https://support.zendesk.com/hc/en-us/articles/203664356. I tried all combinations in Google Search Console (https://mysubdomain.zendesk.com, https://mysubdomain.zendesk.com/hc, https://mysubdomain.zendesk.com/hc/de, https://support.mydomain.com, https://support.mydomain.com/hc, https://support.mydomain.com/hc/de), but it keeps failing.
Taking a look at the page source code of my help center, I found that my tracking code is indeed not in the <head> section, but in the <body> section, a few lines after analytics.js. So the error "Ownership verification failed" by Google Search Console is true. I believe that might be the actual problem, wouldn't you agree?
Yes, I totally agree, Martin! I'm actually going to create a ticket on your behalf with our support team to investigate how we might resolve this without creating any duplicate tracking. Keep an eye out for an email with an update on your ticket!
Thank you, Madison. My issue has been resolved, although I am not sure how we did it. I logged into Google Analytics again and changed "support.mydomain.com" to "mysubdomain.zendesk.com". After that, Google Search Console accepted my request flawlessly. So in the end, it could have been because of the change I made, but I have no proof, only this observation.
Please sign in to leave a comment.