How to add a website to Google Search Console via Google Tag Manager / GTM

H

Creating an account in Google Search Console requires having a Google account. If you don’t have one, check out our guide „How to Create a Google Account.”

If you already have an account, here are step-by-step instructions on how to add your website to Google Search Console.

1. Go to [Google Search Console] and click the “Start” button.

2. Log in to Google Search Console using your Google account.

3. You will be greeted with a screen that offers two options for authorizing/adding your site to Google Search Console.

The first option is authorization using the domain, and the second is using the URL prefix.

Google Search Console

What’s the difference?

The first option, adding the domain, allows you to view data from all versions of your site in one place. You’ll see data for all subdomains, such as www and non-www, and all URLs in both HTTP and HTTPS versions.

If you add the site using the URL prefix, you’ll only see addresses associated with the specified URL (i.e., from a specific domain or subdomain) and only within the specified protocol—e.g., only HTTP addresses if you provide the URL with this protocol.

What is a URL Prefix?

It’s the version that the URL takes. We distinguish between prefixes with a security protocol, e.g.,

– `https://revamper11.com`

without an SSL certificate, e.g.,

– `http://revamper11.com`

and those that may have different subdomains, e.g., the www subdomain. In basic combinations, the URL prefix includes:

– `http://revamper11.com`

– `http://www.revamper11.com`

– `https://revamper11.com`

– `https://www.revamper11.com`

Authorization using the URL Prefix:

There are 5 ways to authorize using the URL prefix method.

In this article, we’ll discuss verification using Google Tag Manager (GTM).

Authorization using Google Tag Manager (GTM)

To use this method:

1. You must use a container code and have an active account.

2. You must have publishing permissions in the container (or be an administrator) in Tag Manager.

Here’s how to verify your site using this method step-by-step:

**Step 1**  

Log in to Search Console.  

You must be logged in to Search Console using the same Google account you use to manage Tag Manager.

**Step 2**  

Select Google Tag Manager on your site’s verification details page and follow the on-screen instructions.

**IMPORTANT:**

Your homepage must contain the correct tag in the correct place.  

The `<noscript>` part of the Tag Manager code must be placed directly after the opening `<body>` tag of your page. No data layers (or anything else besides HTML comments) can be inserted between the `<body>` tag and the Tag Manager code.  

The code cannot be modified in any way. The tag must be in a file smaller than 2 MB.

Potential Problems with This Authorization Method:

**Tag Not Found**  

Check whether the tag has been placed on the page and whether it’s in the correct location. 

The easiest way to do this is by viewing the page source of your homepage.  

– For Windows: Right-click on the page and select „View page source” (or „Show source”). Alternatively, you can press Ctrl + U on your keyboard.

– For Mac: Press Cmd + Option + U on your keyboard.

When you display the page’s code, you can look for the Google tag. Here are two quick methods to check if the tag is in the page’s code:

**Method 1:**

1. Visit the page.

2. Open developer tools (F12 or right-click on the page and select „Inspect”).

3. Open the „Network” tab.

4. In the „Filter” field, type „GTM.js”.

5. Refresh the page to be sure.

6. Find the „GTM.js” script on the network call list.

7. Look at the „Initiator” column. It will indicate which file injected the „GTM.js” script.

   – If it shows „index”, it usually means the script is manually coded in the index.html file.

   – If it shows another JavaScript file, that file is responsible for injecting the script. You can also click on „Initiator” to be taken to the location of the GTM script.

**Method 2:**

1. Visit the page.

2. Open developer tools (F12 or right-click on the page and select „Inspect”).

3. Use the shortcut Ctrl + Shift + F to open global search.

4. Search for the container ID.

   – The search results will show a list of files that reference this ID and their locations.

If the check reveals that the code is not present, it is understandable that Google Search Console verification will not proceed correctly.

**Insufficient Permissions**  

To use this verification method, you must have “publish” or “administrator” permissions on the Google Tag Manager account.

**Incorrect Tag**  

The container ID used by the site is not associated with the Tag Manager account.

The code was found on the homepage, but we were not logged into Search Console with the account that has the appropriate permissions for this Tag Manager container.  

You must use the same account.

**Tag in the Wrong Location**  

The tag was found but is not located in the required place in the page code, i.e., inside the `<head>` section.

**IMPORTANT**  

If you use the verification method based on the Google Tag Manager tag or the HTML `<meta>` method, Search Console will look for the verification tag on the page to which the user is redirected when visiting the specified URL during configuration. For example, if you define your service as `https://revamper11.com`, and every non-logged-in user who enters this URL in the browser is redirected to `https://revamper11.com/home`, Search Console will look for the verification tag on the `https://revamper11.com/home` page.

For other verification methods, such as the file upload method, redirects are not taken into account.

**Server Timeout Exceeded**  

This may be because the server is down or busy and responds slowly.

**Error When Searching for the Site’s Domain Name**  

Google accessed your verification file but could not access the domain due to a DNS error. This may be caused by a server failure or DNS routing issue. Check with the administrator if there are any problems with proper domain recognition.

**Request Redirected Too Many Times**  

You need to check the URL for an infinite loop problem.

We also recommend watching the official video guide from Google:

Check out the other methods:
How to Add a Website to Google Search Console using an HTML File
How to Add a Website to Google Search Console using an HTML Tag
How to Add a Website to Google Search Console using Google Analytics Code
How to Add a Website to Google Search Console using DNS Record

About the author

Jakub Mazurkiewicz

Seasoned SEO Content Strategist with a Passion for Experimentation and Learning

With over a decade of experience in the ever-evolving realm of SEO content, I have honed my skills through a combination of self-directed experimentation and mentorship from industry experts. My passion lies in crafting strategic content that drives organic traffic and elevates website rankings.

Tools of the Trade:

ZipTie: My go-to tool for conducting in-depth indexing monitoring.

ahrefs: A comprehensive SEO toolkit that empowers me to analyze backlinks, track competitor performance, and conduct comprehensive site audits.

Revamper11: An indispensable tool for managing and resolving indexing errors.

By Jakub Mazurkiewicz

Get in touch

The Search Console Blog is your one-stop shop for everything you need to know about Google's premier tool for monitoring and maintaining your website's search rankings and indexing health.

Stay up-to-date by following us on social media.