Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

How to Properly Add Google AdSense to Your WordPress Site

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
How to Properly Add Google AdSense to Your WordPress Site

Google AdSense is one of the most popular way to monetize your website. Did you know that you can easily add Google AdSense to your WordPress site and start making money? In this article, we will show you how to add Google AdSense in WordPress along with sharing some best practice and tips to increase your earnings.

What is Google AdSense?

Google AdSense is an advertising network run by Google that allows bloggers and website owners an opportunity to earn money by showing text, image, video, and other interactive advertisement on their websites. These ads are targeted by site content and audience.

Google AdSense is hassle free because you don’t have to deal with advertisers or worry about collecting money. Google administers and maintain relationships with the advertisers. They collect the payment, take their share, and send your share to you.

AdSense offers cost-per-click ads (CPC) which means that you earn money every time a user clicks on the ad on your website. The amount received per click varies based on multiple factors.

Video Tutorial

If you don’t like the video or need more instructions, then continue reading.

Getting Started with AdSense

First thing you need to do is sign up for a Google AdSense account. If you have a Gmail account, then you can use an existing account.

Once you’ve submitted your application, you will receive an email within 6 – 8 hours telling you whether you have passed the first step of the review process. If you passed the first check, then you can log in to your AdSense account and get your ad code.

Start by clicking on the My ads tab and then click on the New ad unit button.

Google AdSense Create Ad

This will bring you to create new ad page. On this page, you need to select the Ad size, type, and style.

Adsense Ad Units

The name of the Ad is only used for internal purposes, so you can name it like “SiteName Sidebar”.

The next option is choosing the Ad Size. While Google offers a wide-variety of ad sizes, there are certain sizes that are listed under recommended because those are the most popular among advertisers. What that means is that these ads are likely to have a higher inventory thus a better payout.

The next option is to choose Ad type, we recommend having both Text & display ads.

For backup ads, you can either choose to have a blank space or fill it with your own ad. This is shown when Google cannot find an appropriate advertise (which rarely happens).

Custom Channels feature allows you to better track the ad performance based on sites. You don’t have to use it if you don’t want to.

Ad style allows you to control the display of your text based ad units. We recommend using your site’s color scheme for best results.

Once you’re done with this setup, simply click on Save and get code button. You will be prompted with a message “Ad successfully created”, and you will also see the Ad code.

Google AdSense Code

Copy your Ad code and paste it in a Notepad because you will need it in the next step.

Adding Google AdSense in WordPress

You need to determine where you want to show the ad on your website. Most commonly ads are displayed in the sidebar. You can add the Ads in your sidebar by using WordPress widgets.

Simply go to Appearance » Widgets in your WordPress admin area. Next drag & drop the Text widget to the appropriate widget area and paste your Google AdSense code in there.

AdSense in Text Widget

For better placement control and tracking, we recommend that you check out OIO Publisher or AdSanity WordPress plugin. (See: Best Ad Management WordPress solutions)

AdSense Best Practices and Frequently Asked Questions

Over the years, we’ve answered several AdSense related questions. Having used AdSense on several of our sites such as List25, we’ve learnt a whole lot about optimizing. Below are some AdSense best practices and frequently asked questions.

What’s the best AdSense Ad Size?

Although ad placement is key, we’ve found that the best sizes are 336×280 and 300×260. These ads tend to fit on most screen sizes and have the best pay rate as well.

What’s the Best AdSense Placement?

This entirely depends on your layout. The goal is to get more clicks, so you want to place your ads in a more prominent spot. We have found that ads within post content towards the top of the screen tends to get the most clicks.

Several users have asked us about adding AdSense in a floating widget because it will be very prominent. We strongly recommend against that because it is not allowed by Google Terms of Service. If you violate their TOS, then you can get banned from the program.

Can I click on my Ads?

Often beginners are tempted to click on their own ads or ask their family members to click on their ads. Please don’t do that. Google’s algorithm is very smart and knows when you’re clicking on your own ad. This can get you banned from the program.

What is Page RPM?

RPM stands for Revenue per Mille meaning revenue per 1000 impressions. This is determined by multiplying the total number of clicks and cost per click and then dividing that by the total number of pageviews.

We hope this article helped you add Google AdSense in your WordPress site. If you have any questions, then please feel free to ask us by leaving a comment below.

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. Mary says:

    Hello, and thank you for this training.

    My question (that brought me here) is how to put the initial code In my html.

    It scares, me. I have broken my site the last time touched the editor.

    DO you have any suggestions?
    Thanks Mary

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.