How to Add Google AdSense to Your WordPress Site?

How to Add Google AdSense to Your WordPress Site?

One of the most common ways to monetize your website is through Google AdSense.

It lets you automatically sell and get paid for ad space on your website. AdSense is one of the simplest ways to start earning money from your website.

We’ll teach you how to install Google AdSense in WordPress, as well as some best practices and tips for increasing your profits, in this article.

What is Google AdSense?

Google AdSense is a Google-owned advertising network that allows bloggers and website owners to make money by displaying text, pictures, videos, and other interactive advertisements on their sites. These ads are particularly relevant since they are targeted by site content and audience.

You don’t have to deal with ads or worry about collecting money with Google AdSense, so it’s a zero. Google manages and maintains ad relationships. They receive the payment, deduct their fee, and send the remaining money to you.

AdSense offers cost-per-click (CPC) ads, which means you get paid every time a user clicks on an ad on your site. The price paid per click is determined by a number of factors.

Getting Started with AdSense

The first step is to sign up for a Google AdSense account. You may sign up with your current Gmail account if you already have one.

Once you’ve submitted your application, you’ll have to wait for it to be reviewed by the Google AdSense team. For some publishers, this might take anything from several hours to a few weeks.

Once it’s been authorized, you’ll be able to access your AdSense account and obtain your ad code. This is the code you’ll need to add to your website in order for ads to display.


Google AdSense just announced auto ads, in which you paste only one piece of code and Google selects when, where, and how many advertisements to appear on each page automatically.

Most publishers, on the other hand, still use manual ways to insert ads on their websites.

Both ways will be shown. Starting with manual ad placement is recommended. After you’ve begun earning, you may experiment with auto-ads to see how they compare.

1. Manually Place Google AdSense Ad Code in WordPress

You’ll start by choosing the Ads menu from the left column and then the ‘By ad unit’ tab. From here you need to click on ‘Create New Ad’.

You’ll be asked to select an ad kind. ‘Display ads,’ ‘In-feed ads,’ and ‘In-article ads’ are the options.

Start with the display ads if you’re unsure.

How to Properly Add Google AdSense to Your WordPress Site?

Next, you need to provide a name for this ad unit and select the ad size and type.

How to Properly Add Google AdSense to Your WordPress Site?

Because the Ad’s name is only used inside, you may call it anything you like, like “SiteName Sidebar.”

The next step is to select an ad size. Although Google offers a wide range of ad sizes, certain sizes are listed as recommended since they are the most popular among advertisers.

You may also select whether your ad should be responsive or fixed. Responsive ads are the best option because they function on all devices and screen sizes.

Next, to continue, click the Create button.

The ad code will now be generated by AdSense for you. It contains your publisher ID as well as the unique ad unit ID.

How to Properly Add Google AdSense to Your WordPress Site?

You may also copy the code for your AMP pages if your website has a Google AMP version.

Simply copy and paste your ad code into a plain text editor such as Notepad or TextEdit. This will come in useful in the next step.

2. Adding Google AdSense in WordPress

You must decide where you want the ad to display on your website. The most typical place for ads to appear is in the sidebar. Using WordPress widgets, you may include Google Adsense in your sidebar.

Simply go to your WordPress admin area’s Appearance » Widgets page. After that, drag and drop the ‘Custom HTML’ widget to the relevant widget area and paste your Google AdSense code into it.

How to Properly Add Google AdSense to Your WordPress Site?

1. Add Auto-Ads AdSense Code in WordPress

It takes a long time to add individual ads to different places of your website. The bulk of beginners has difficulty figuring the best places to place advertisements on their websites.

Google has created auto-ads to address this issue. This allows you to upload a single code snippet to your website and let Google AdSense figure out the best-paying placement, ad size, and kind for you.

This method has the disadvantage of giving you less control over ad placement on your website.

This is how you’ll add Google AdSense to your website if you wish to use the auto-ads option.

To get started, go to your Google AdSense account and select the Ads tab. Then, to produce the auto-ads code, click on the Get Code button.

How to Properly Add Google AdSense to Your WordPress Site?

AdSense will now build and display a code snippet including your publisher ID. This code may now be copied and pasted into a text editor.

How to Properly Add Google AdSense to Your WordPress Site?
Adding AdSense Auto-Ads Code in WordPress

The auto-ads code generates advertising throughout your WordPress website using a single code snippet. This means you’ll have to paste the code into all of the pages where you want the ad to display.

Adding the code to your WordPress theme’s header.php file is one way to do this. The disadvantage of this method is that if you update or alter your theme, your ad code will vanish.

Using a plugin like Insert Headers and Footers is the ideal approach to add any site-wide code to your website.


The Insert Headers and Footers plugin must first be installed and activated.

After activation, go to the Settings » Insert Headers and Footers page. From here, you need to paste your Google AdSense code in the header section.

Don’t forget to click on the ‘Save’ button to store your changes.

The ad code will now show on all of your website’s pages, due to the plugin. It might take a while for Google AdSense to start showing ads.

Also Read: How to Fix 500 Internal Server Error in WordPress
Also Read: Best Managed WordPress Hosting?
Also Read: How To Secure Your WordPress Website?
Also Read: What Is SSL Certificate?
Also Read: How To Fix Your Website’s Insecure Content?

Buy Hosting For Website

Hostguid listed many hosting plans so you can easily compare many hosting companies hosting packages for your website.

Join Our Telegram Group

Upcoming hosting and SSL offers and news updates here. We can try to solve your doubt regarding any problem like Domain, Hosting, SSL certificate, etc. And News update here.

Share your love
Host Guid
Host Guid
Articles: 134

Leave a Reply

Your email address will not be published. Required fields are marked *