Notification

Please make sure that you visit Your AdSense Page, where you can find personalised information about your account to help you succeed with AdSense.

Code implementation guide

Where to place the AdSense code in your HTML

After you've generated the AdSense code, you need to paste it between the <head> and </head> tags of your site. We recommend that you place the AdSense code on every page across your site to get the most out of AdSense.

Tip: WordPress user? Get help with adding AdSense code.

The following examples show you where to place the AdSense code:

Example HTML page before the AdSense code has been added

<html>
<head>
This is the head of your page.
<title>Example HTML page</title>
</head>
<body>
This is the body of your page.
</body>
</html>

Example HTML page with the AdSense code added in the <head> tag

<html>
<head>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1234567890123456" crossorigin="anonymous"></script>
This is the head of your page.
<title>Example HTML page</title>
</head>
<body>
This is the body of your page.
</body>
</html>

Note: This is sample code only, please don't use it in your own site's code.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Main menu
15399950060897007276
true
Search Help Centre
true
true
true
true
true
157
false
false