I recently reached out to Google’s John Mueller to ask him to ask whether it was possible to implement ‘noindex’ tags using Google Tag Manager. You may need to do this in instances where you don’t have access to change the HTML of a page, or getting developers to implement changes is cumbersome, but you do have GTM installed.
Tried and tested
John’s response was inconclusive. However, this was a fairly simple test to conduct. After deploying the meta robots tag via GTM I received this notification when using the Google URL inspection tool:
Step by step: Deploying the noindex tag via Google Tag Manager
- Sign in to your Google Tag Manager account and select the appropriate container for the website where you want to implement the “noindex” tag.
- In the container, click on the “Tags” section in the left-hand menu.
- Click on the “New” button in the top right corner to create a new tag.
- Select the “Custom HTML” tag type.
- Copy and paste the following code into the HTML field:
<meta name="robots" content="noindex">
- In the “Triggering” section, choose the trigger that will fire the tag. For example, you could create a trigger based on the URL of the pages you want to add the “noindex” tag to.
- Save the tag and publish the changes to your website.
- Verify the implementation by checking the source code of the affected pages to ensure the “noindex” tag has been added correctly. You can also use a tool like Google Search Console to confirm that the pages have been excluded from the search results.
- Repeat these steps for any additional pages or sections of your website where you want to implement the “noindex” tag.
Note: Make sure to thoroughly test the implementation to ensure it is working as expected and not negatively impacting your website’s search engine visibility. This section of the blog was generated using AI – so please test thoroughly before deployment.
How to test indexing using the URL inspect tool
- Open Google Search Console
- Paste the URL into the ‘Inspect any URL’ search bar at the top of the page
- If the URL is not on Google click ‘Test Live URL’
- Viola – you should see the results of your newly implemented noindex tag
In summary, yes, it is possible to implement a ‘noindex’ tag via Google Tag Manager (GTM). This is particularly useful for those of you who do not have direct access to edit the HTML of your site’s pages, but have GTM installed.
Follow the instructions above to implement the ‘noindex’ tag via GTM, but remember to thoroughly test before pushing live.