How to resolve “Only one AdSense head tag supported per page”

Google AdSense currently shows an error in the browser developer console that is irritating many publishers without reason:

 div {
	overflow: auto;
}

.shcb-language {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	-webkit-clip-path: inset(50%);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal;
	word-break: normal;
}

.hljs {
	box-sizing: border-box;
}

.hljs.shcb-code-table {
	display: table;
	width: 100%;
}

.hljs.shcb-code-table > .shcb-loc {
	color: inherit;
	display: table-row;
	width: 100%;
}

.hljs.shcb-code-table .shcb-loc > span {
	display: table-cell;
}

.wp-block-code code.hljs:not(.shcb-wrap-lines) {
	white-space: pre;
}

.wp-block-code code.hljs.shcb-wrap-lines {
	white-space: pre-wrap;
}

.hljs.shcb-line-numbers {
	border-spacing: 0;
	counter-reset: line;
}

.hljs.shcb-line-numbers > .shcb-loc {
	counter-increment: line;
}

.hljs.shcb-line-numbers .shcb-loc > span {
	padding-left: 0.75em;
}

.hljs.shcb-line-numbers .shcb-loc::before {
	border-right: 1px solid #ddd;
	content: counter(line);
	display: table-cell;
	padding: 0 0.75em;
	text-align: right;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	white-space: nowrap;
	width: 1%;
}
]]>

adsbygoogle.push() error: Only one AdSense head tag supported per page. The second tag is ignored.

Code language: CSS (css)

I have seen this happening more often after Google AdSense changed the manually placed AdSense ad units to match the Auto ads code.

What does this warning mean?

Contents

First of all, this warning is not critical. It does not impact your revenue or your page speed.

What now says “Only one AdSense head tag supported per page”, previously was written as Only one ‘enable_page_level_ads’ allowed per page.

Until recently, this error only appeared when using two or more Auto ads codes on your site.

Google AdSense warning: “Only one AdSense head tag supported per page. The second tag is ignored.”

The Auto ad code is the one you receive from Google AdSense to verify your site and place ads automatically in positions of their choice.

Sometimes, publishers added that code multiple times because ads didn’t show up right away, and they weren’t sure if they already added the code. Others placed multiple Auto ads codes because they assumed that ads would show where they put them.

See Also  How To Make Monkey Bread In The Microwave

Our support helped many of you to understand this warning and remove the duplicate AdSense code.

Recently, Google AdSense updated its codes for Auto ads and for manually placed ads. Both codes start with the same line now, which looks like this:

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1234567890" crossorigin="anonymous"></script>

Code language: HTML, XML (xml)

Since that change, Google AdSense throws the error “Only one AdSense head tag supported per page.”

What do I need to fix?

As the error message also states: “The second tag is ignored.”

So you don’t need to do anything. Neither your earnings nor your page speed will suffer from this.

I assume that Google AdSense will fix this behavior eventually.

How to resolve the warning “Only one AdSense head tag supported per page”

If you are a purist, like I am sometimes, and want to get rid of the warning anyway, you might need to change the Google AdSense codes manually.

The solution is simple if you only have the Auto ads code added multiple times. In that case, just follow our tutorial on how to remove AdSense.

Getting rid of the false warning when you use manually placed Google AdSense ads is a bit more tricky.

You need to remove the script tags manually from each one, except the last one on your site.

So if this is the original ad code:

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=1234567890" crossorigin="anonymous"></script> <!-- Medium Rectangle --> <ins class="adsbygoogle" style="display:inline-block;width:300px;height:250px" data-ad-client="ca-pub-1234567890" data-ad-slot="987654321"></ins> <script> </script>

Code language: HTML, XML (xml)

The version without the script looks like this:

<!-- Medium Rectangle --> <ins class="adsbygoogle" style="display:inline-block;width:300px;height:250px" data-ad-client="ca-pub-1234567890" data-ad-slot="987654321"></ins> <script> </script>

Code language: HTML, XML (xml)

In Advanced Ads, you would need to use the Plain text and Code ad type to manipulate your Google AdSense codes like this.

See Also  How to make tea out of weed stems

I mentioned that I am often a purist, too. However, in this case, I am sitting it out on my websites because I believe Google AdSense will fix it.

Have you just started using Google AdSense and are unsure if you did something wrong with your setup? Open now a thread in our forum and get free support.

Let’s go!

Rate this post
Back to top button