January 31

How to Add Google AdSense to Your WordPress Site (Complete Guide)



This post was originally published on this site

Google Adsense is one of the best ways to earn extra income through advertisements on your WordPress site. But getting started can be a daunting experience.

Doing something for the first time stirs up an overwhelming number of questions enough to abandon your initiative! How do I set it up? How do I get paid? Will the advertisements affect my site’s performance?

Don’t worry. Adding Google Adsense to WordPress can seem complicated at first. But if you follow our guide in which we’ve broken down the steps, you’ll find that it’s not hard.

In this article, you’ll learn how to add Google AdSense to WordPress. You’ll also learn about its program policies and tips to maximize your revenue.

What is Google AdSense?

AdSense is a service created by Google that allows you, a website owner, to display advertisements on your website.

If your website meets their eligibility requirements, you can sign up and then set up advertisement spaces on your site. This will enable you to monetize your WordPress blog or website.

Before adding Google Adsense to WordPress, it’s important to understand how it works.

How does Google AdSense Work?

We can explain how AdSense works on your website in four steps:

Step 1 – Sign Up for Google AdSense

Google has a quick sign up process. If your website meets its requirements, it will be approved. We’ll delve deeper into the main requirements below.

Step 2 – Create Ad Spaces on Your Site

Next, you need to paste ads code on your site which will enable ad spaces. You can then choose where you want the ads to appear.

Step 3 – Getting Advertisers

Advertisers will bid to display ads in your spaces. This happens in real-time auctions. The ads that pay the highest will be selected. Auto ads will be displayed.

Step 4 – Getting Paid

Google bills the advertisers according to the number of valid clicks their ads received on your website. You will receive a monthly payment directly from Google.

Seems simple enough to sign up for Google’s AdSense and it is.

How to Set Up AdSense on Your WordPress Website

To set up AdSense, you need to make changes to your WordPress files and add code to your theme. This can be daunting for someone who doesn’t have the technical knowledge or is savvy with the inner workings of WordPress. But don’t worry, we’ll give you the exact steps to follow to get AdSense on your website. Let’s begin.

Step 1. Create an AdSense Account

As we said earlier, you first need to sign up for a Google Adsense account. Simply fill up the required fields and get started. It will ask you to set up a payment ID or select the auto-generated one.

Step 2: Connect You Website

AdSense will give you a code that you need to insert into your WordPress site. This will connect your WordPress site to AdSense. Follow these steps:


wordpress google adsense code

Connect to AdSense by inserting this code into your WordPress site


    • Google Adsense will display a code that you need to embed into your site’s header section. For now, simply highlight the code and copy it. Do not click ‘Done’ yet.
    • Log into your WordPress dashboard.
    • Access Appearance -> Theme Editor. Here, choose the Theme Header in the Theme Files section.


edit theme editor wordpress

You need to access the header.php file under Theme Files


    • Paste the copied code just above the </head> tag.


edit wordpress theme editor to add google adsense

Paste the copied script here


    • Click on ‘Update File’.
    • Now, visit the AdSense page, select the checkbox “I’ve pasted the code into my site”, and now you can click on ‘Done’.
    • Google AdSense will display a pop up that tells you your account approval is in progress. Click on ‘Got it’ to close the box.


reviewing website


This will integrate AdSense with WordPress.

Step 3. Create Ad Space

Once Google has reviewed your site, they’ll send you an email. If your account is approved, you can start creating ad spaces. To do so, follow these steps:

    • You can access the Adsense dashboard.
    • Navigate to MyAds on the left sidebar > Content > Ad units.
    • Here you can create a new ad unit. Select what kind of ad type you want such as Display Ad.
    • Next, enter a name and the ad size.
    • Upon clicking ‘Save and get code’, a window will pop up with the code. Here, select all and copy the code.

Step 4. Embed Ad Code to WordPress

You need to paste the code onto your WordPress site. This can be done in two ways – manually or using an ads plugin.

Manually Inserting Ad Code

    • On your WordPress dashboard, go to Appearance > Widgets.
    • Add a new widget by choosing ‘Text’ to choose where you want to display the ads. In this example, we will place it at the footer. Then, press the Add Widget button.


select header from appearance


    • You can fill in the Title or leave it empty. Next, paste the Google AdSense code you copied in the Content field.


paste wordpress google adsense code


    • Click on ‘Save’ and you’re done.

Inserting Ad Code Using a Plugin

While you can insert this code manually, many find it easier to use a plugin that will get the job done. Here are three plugins you can find in the WordPress repository:

    • Woody ad snippets – The plugin enables you to create snippets on your site which you can use to insert ads. You can choose to insert ads into posts, pages, or categories. The plugin is free to use. It also has a paid plan at $19 per year that will give you access to their snippets library.
    • Ad Inserter – This plugin makes it easy to insert ads before and after your posts, or between posts on blog pages. If you purchase the premium plan, you get access to sticky sidebar ads and sticky ad animation. Paid plans cost $22.31/year.
    • Advanced Ads – You can manage your ads easily with this plugin. It has features like displaying unlimited ads, saving ads draft, and scheduling ads. Pro plans start at $43.51/year and give you access to click fraud protection and alternative ads for ad-block users.

With that, you should have ads being displayed on your site. As people click on your ads, you’ll start earning money. To maximize your ad income and also adhere to Google’s policies, we’ve listed out some best practices you could follow.

AdSense Best Practices

When it comes to earning from Google AdSense ads, it can work well in your favor or fail miserably depending on how you use it. We’ve listed out some of the best practices that will help you make the most of AdSense.

Best Practices for Your Website

    • Publish unique and relevant content to your site to boost SEO and gain more visitors.
    • Ensure your site is mobile friendly and responsive.
    • Learn to place ads strategically from other websites. Ads can slow down the performance of your site and you could witness your traffic falling drastically.
    • Don’t clutter your site with ads. Place them in areas where they do not disturb the customer’s intention. If they came to read your blog article, they shouldn’t be bombarded with ads.
    • Don’t insert ads on empty pages. It will be against Google’s policies and you’ll waste your website’s resources.

Best Practices for Google AdSense

    • Google AdSense provides you with heatmaps. Learn how to use them as it will help you with ad placement.
    • Don’t be afraid to try different ad formats to see what works for your site. Play around with different ad sizes to find the best one for your site’s placement.
    • Track your ad’s performance regularly to see which ones earn the most.
    • Don’t click on your own ads or force users to click on them. You risk getting suspended by AdSense.
    • Never create multiple AdSense accounts with the same payee name.
    • Get an ad manager plugin to track your progress.

This should help you improve the way you display ads on your website for your visitors. You should be ready to use Google AdSense on your website now. But before we wrap up, we’ll touch upon important points of Google’s policies that you should know.

Google AdSense Program Policies

Google has strict policies which  your website must adhere to in order to sign up or continue to run ads under their program. If you fail to follow the guidelines, you could be rejected or have your account suspended.

Quality Guidelines

To get approved for AdSense, your website should follow the webmaster quality guidelines.

    • Make sure your site adds value to the user. You cannot create multiple pages and sub- domains, or duplicate content on another domain.
    • Your site must provide relevant and unique content to users.
    • Don’t use pages created just for search engines or approaches that go against being unique.

Program Policies

Google AdSense also program policies that you need to adhere to in order to get your site approved faster. Some of them include:

    • You cannot earn money by clicking on your own ads or artificially creating clicks.
    • You cannot offer people incentives to click on your ads.
    • Your site cannot contain abusive content.
    • Google may not consider traffic coming from paid-to-click programs, unwanted emails, and other avenues that do not comply with Google’s policies.
    • Ads may not be placed in inappropriate places on your site such as pop-ups and emails.
    • Your site should be easy to navigate. It shouldn’t redirect users to unwanted websites or initiate downloads.
    • Your site should not contain any malware. If it does, you need to fix it immediately to avoid suspension of your AdSense account and blacklisting of your website. Use our MalCare security plugin to get rid of malware instantly.

Google also defines technical and privacy requirements of your website. We recommend reading on all their program policies before setting up your account.

With that, you should be savvy with Google AdSense. We’re confident that you have it set up on your WordPress site and ready to get started.


Google AdSense is a great way to earn revenue from your website. But remember to adhere to Google’s policies.

Before we end, we strongly recommend elevating your website’s security protocols if you decide to use Google AdSense. If your WordPress gets hacked, hackers can misuse your ad units to display their own content. This usually contains adult content, illegal drugs, counterfeit products. This can severely damage your site and drive visitors away.

It can also lead to your account being suspended by Google. Getting the suspension removed entails a tedious process!

Eliminate the risk of attacks by securing your WordPress website with MalCare. The security plugin will actively monitor activities on your site and block malicious hack attempts.

Keep Hackers Away with our MalCare Security Plugin!




What is the minimum traffic my website should receive to be eligible for Google Adsense?

The great thing about AdSense is that anyone can sign up. There is no minimum amount of traffic your site should be receiving to sign up for Google AdSense. However, your traffic will greatly affect how much income you can earn.

I have managed WordPress Hosting. Will they take care of integrating Google AdSense?

Managed WordPress Hosts don’t usually have an automated option to integrate Google AdSense. You can contact their customer support if you need clarification.

How Much Revenue Can I Earn From Google AdSense?

On the low end, people earn $2 per click, but it can go up to $50 per click. The amount of revenue you earn greatly depends on what kind of site you have and how much traffic it gets.

How long does it take to get approval from Google to join the AdSense Program?

It can take up to 2 weeks to get your site approved for AdSense.

Can I choose what ads are displayed on WordPress sites?

It’s difficult to control what can be displayed on your site as AdSense has millions of publishers. However, AdSense has the option to “allow or block ads” on the AdSense or Ad Exchange dashboard. Here, you choose from a long list of ad categories on what types of  ads to show or block on your site.

How do I get paid for AdSense?

You can set up a form of payment on the dashboard. The forms of payment available depends on your country. Google will issue payments in a monthly cycle between the 21st and 26th.

The post How to Add Google AdSense to Your WordPress Site (Complete Guide) appeared first on MalCare.

About the author 

WP Maintain Support Protect

You may also like

Who Attacked SolarWinds and just why WordPress Users Have to know

Who Attacked SolarWinds and just why WordPress Users Have to know

SolarWinds and offer Chain Attacks: Could this happen to WordPress?

SolarWinds and offer Chain Attacks: Could this happen to WordPress?

WordPress Hardening: 18 Methods to Harden Security of one’s Website

WordPress Hardening: 18 Methods to Harden Security of one’s Website
{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Subscribe to our newsletter now!