Notification

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

Code implementation guide

Where to place 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 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.

Where to add AdSense code

The following HTML examples show you where to place the AdSense code.

Note: This is sample code only which shows where to add AdSense code. Don't use this code exactly in your own site's code.

Example of an HTML page before 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 of an HTML page after AdSense code has been 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>

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
17400038935025043870
true
Search Help Center
true
true
true