If you are looking to connect Google AdSense to your website, you are in the right place:

Insert the Google AdSense code into a website

Within the editor, access the integrations settings and find the Custom code field. Insert your Google AdSense code there:

Save the changes and update your website. Once you have connected Google AdSense, it's time to set up ads.

Setting up ads

You can choose from two types of ads – automatic ads, or ad units:

  • Auto ads

    • Google itself works out which ads to show and where to show them, leaving you free to focus on creating great content

    • You control all the ads with the flick of a switch

    • Auto ads work on mobile, tablet, and desktop and provide good ad coverage on your pages

    • Google will only show Auto ads when they're likely to perform well and provide a good user experience

  • Ad units

    • You yourself can select from a range of ad types and ad sizes, and position your ads exactly where you want them to appear on your pages

    • It's up to you to ensure that your ads comply with the AdSense program policies

Set up Auto ads

Before you begin, make sure your site is listed on your Ads page. If not, you'll need to add the site to your sites list before you set up Auto ads.

  1. Sign in to your AdSense account

  2. Click Ads → Overview

  3. In the table of all your sites, click Edit next to your site

  4. Under Site settings, turn on Auto ads

  5. Click Ad load and use the slider to control the number of ads you show on your pages

  6. In the Page exclusions section, click Manage to exclude specific pages from showing Auto ads

  7. Click Apply to site

  8. Click Apply now Save, to immediately apply your Auto ads settings to your site (it may take up to an hour for the ads to appear on the page)

Create a display ad unit

  1. Sign in to your AdSense account

  2. Click Ads → Overview

  3. Click By ad unit

  4. Click Display ads:

  5. Give your ad unit a name: make sure to choose a unique, descriptive name to help you find your ad unit later

  6. In the Ad size section, choose the size of the ads that you’d like to show; we recommend you leave Responsive selected so that the ads automatically adapt their size to fit your page layout and your users' devices:

  7. Click Create.

  8. On the next page, click Copy code snippet:

  9. Embed the code to your website

  10. Click Done at your Google AdSense account

It usually takes a few minutes for ads to appear on the page, but occasionally it can take up to an hour. If ads still aren't showing after an hour, check if your site has the status of “ready” on your Sites page.

Where to find the code for my ads?

Auto ads

  1. Sign in to your AdSense account

  2. Click Ads → Overview

  3. Click Get code

  4. Click Copy code snippet

After you've copied the AdSense code, the next step is to paste it into the <head> part of your website's code. Be aware that it can take up to an hour for ads to appear on the page.

Ad units

  1. Sign in to your AdSense account

  2. Click Ads → Overview

  3. Click By ad unit

  4. In the Existing ad units table, find the ad unit, the code of which you want to get

  5. Hover over the ad unit and click Get code

  6. Copy the whole ad unit code

After you've copied the ad unit code, the next step is to embed it on your website.

Uploading an ads.txt file

Creating your own ads.txt file allows you to control who can sell ads on your website and it's a practice highly recommended by Google.

Once you create the file, open your website's integrations settings, and paste the file into the Google AdSense field:

Your ads.txt file should look like this, where pub-0000000000000000 is your own publisher ID: google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0.

Finally, save the changes and update your website.


Did this answer your question?