All Collections
Website builder
Integrations
Website Builder: How to Connect Google AdSense
Website Builder: How to Connect Google AdSense
Learn how to connect Google AdSense using Hostinger Website Builder
Updated over a week ago

In this article, you'll learn how to:

Insert the Google AdSense Code Into Your Website

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

Inserting Google AdSense code in a website created with Hostinger Website Builder

Save the changes and update your website. Now, it's time to set up ads (see below).


Create Ads

You can choose from two types of ads:

Google itself decides which ads to show and where to show them, allowing you to focus on creating quality ad content

You 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

You control all the ads with the flick of a switch

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

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

Set Up Auto Ads

Before you begin, make sure that your website is listed on your Ads page. Learn more: Add a new site to your sites list

Follow this guide by Google AdSense: How to set up Auto ads.

Create Display Ad Units

Follow this guide by Google AdSense: Create a display ad unit. Copy and paste the ad unit code into your website using the embed code element.

NOTE: It takes up to an hour for the ads to appear on your website; if it takes longer, check if your website has the status Ready: Check the status of AdSense sites


Find the Code of Your Ads

Auto Ads

Follow this guide by Google AdSense: How to get and copy the code for Auto ads.

Ad Units

Follow this guide by Google AdSense: How to get and copy the code for ad units. Copy the ad unit code, and paste it into your website using the embed code element.

NOTE: It takes up to an hour for the ads to appear on your website; if it takes longer, check if your website has the status Ready: Check the status of AdSense sites


Upload an ads.txt File to Your Website

Creating your 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:

Uploading an ads.txt file to a website created with Hostinger Website Builder

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

Finally, save the changes and update your website.

Both your account and your website need to be approved by AdSense before ads can start showing. The status “Getting ready” means that your account is still under review. Google usually takes a few days to approve it, but, in some cases, it can take 2–4 weeks 💡

Did this answer your question?