Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Properly Add Google AdSense to Your WordPress Site

Do you want to add Google AdSense to your WordPress website?

Google AdSense is one of the easiest ways to start making money online with your website. It allows you to automatically sell your website’s ad space to advertisers and get paid.

In this article, we will show you how to add Google AdSense in WordPress, along with some best practices and tips to increase your earnings.

How to Add Google AdSense to WordPress site

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, images, videos, and other interactive advertisements on their websites. These ads are targeted by site content and audience, so they’re highly relevant.

Google AdSense is hassle-free because you don’t have to deal with advertisers or worry about collecting money. Google administers and maintains relationships with advertisers. They collect the payment, take their management fee, and send the rest of the money 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 a variety of factors.

Getting Started with AdSense

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

Once you’ve submitted your application, you will need to wait for the Google AdSense team to review it. This may take a few hours to a few weeks for some publishers.

Once it is approved, then you can log in to your AdSense account and get your ad code. This is the code that you need to place on your WordPress website to display ads.

With Google AdSense auto ads, you can paste just one piece of code and then Google automatically decides when, where, and how many ads to show on each page.

However, many publishers use the manual method to individually place ads on their websites.

We’ll show you both methods. We recommend starting with the manual ad placement first. Once you have started earning, then you can experiment with auto-ads to compare them yourself.

Video Tutorial

Subscribe to WPBeginner

If you’d prefer written instructions, just keep reading.

1. Manually Place Google AdSense Ad Code in WordPress

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

You will be asked to choose an ad type. You can select from Display ads, In-feed ads, and In-article ads.

If you are unsure, then start with the display ads.

Choose your unit

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

Enter details and select size

The name of the Ad is only used for internal purposes so you can name it anything 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.

You can also choose whether you want your ad to be responsive or fixed. We recommend choosing responsive ads as they work well on all devices and screen sizes.

Next, click on the Create button to continue.

AdSense will now generate the ad code for you. It contains the unique ad unit ID and your publisher ID.

Copy the code

Simply copy your ad code and paste it into a plain text editor like Notepad or TextEdit. You will need it in the next step.

Adding Google AdSense in WordPress

Next, you need to determine where you want to show the ad on your website. Ads are most commonly displayed in the sidebar. You can add Google Adsense to your sidebar by using WordPress widgets.

Simply go to the Appearance » Widgets page in your WordPress admin area. Next, click the ‘+’ button to add a ‘Custom HTML’ widget block to the appropriate widget area.

Add custom HTML widget block

Next, you’ll need to enter the Google AdSense code in the Custom HTML widget block.

After that, don’t forget to click the ‘Update’ button.

Enter code and update widgets page

For better placement control and tracking, we recommend checking out the AdSanity WordPress plugin. You can see our guide on the best ad management WordPress solutions for more details.

2. Add Auto-Ads AdSense Code in WordPress

Adding individual ads to different areas of your website takes a lot of time. Most beginners struggle to find the best locations to display ads on their sites.

To solve this, Google introduced auto-ads. This allows you to simply add one code snippet to your site and let Google AdSense figure out the highest paying location, ad size, and type.

The disadvantage of this method is that you have less control over ad placement on your website.

If you want to use the auto-ads feature, then this is how you’ll add Google AdSense to your website.

First, log in to your Google AdSense account and click on the Ads tab. Next, you need to click on the Get Code button to generate the auto-ads code.

Get code for auto placement

AdSense will now generate a code snippet with your publisher ID and display it. You can now copy and paste this code into a text editor.

Copy and paste the code

Adding AdSense Auto-Ads Code in WordPress

The auto-ads code uses a single code snippet to generate ads everywhere on your WordPress blog. This means you need to add the code to all the pages where you want to display the ad.

One way to do this is by adding the code in your WordPress theme’s header.php file. However, the disadvantage of this method is that your ad code will disappear if you update or change your theme.

The best way to add any site-wide code to your website is by using a plugin like Insert Headers and Footers.

First, you need to install and activate the Insert Headers and Footers plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

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

Insert code in the header

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

The plugin will now add the ad code on all pages of your website. It may take Google AdSense some time to start showing ads.

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 in the past, we’ve learned 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×250. 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 impressions and 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 tend 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 own Google AdSense 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 in Google AdSense?

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.

Can I use my Blogger or YouTube AdSense account with WordPress?

Yes, you can. If you started using AdSense on one of Google’s hosted platforms like Blogger or YouTube, then you can change your AdSense account type and use it with WordPress. You’ll need to provide Google AdSense with the URL of the site you want to monetize by filling out an application form.

Simply log in to your AdSense account and then under ‘My Ads’ click on the ‘Other Products’ option. Next, you need to click ‘Upgrade now’ and complete the application form.

What is CTR in Google AdSense?

CTR or click-through rates differ vastly for different kinds of websites. Your ad clicks depend on a lot of factors like your website’s topics, your audience type, ad placement on your site, and more. The ideal CTR for Google AdSense is really hard to define because you don’t have access to the click rates of other websites like your own.

However, Google AdSense has built-in tools that will start showing you messages if your site is not getting a good CTR. You can follow the optimization guides shown inside the Google AdSense dashboard to improve your ad revenue.

When and how does Google AdSense pay publishers?

Each month, Google AdSense calculates your previous month’s earnings and shows them on your ‘Transactions’ page. If your earnings match the required threshold, then your payment is processed and released by the 21st of that month.

There are multiple payment methods available, including direct electronic transfer, wire transfer, check, Western Union, and more.

Why did Google AdSense reject my application?

Google Adsense may reject your application if your website is brand-new or otherwise doesn’t meet the AdSense program policies or their terms and conditions.

If they do, you could always consider using another ad management plugin or try another way to make money with your WordPress site.

What are the requirements to get Google AdSense application approved?

Here are the minimum requirements to get your Google AdSense account application approved.

  • Your website and all its content must comply with AdSense program policies and terms and conditions.
  • Your website should be at least 6 months old.
  • You, the applicant, must be over 18 years old.

Note: Even if your application meets all the requirements, Google AdSense still reserves the right to decline your application.

Can I add Google AdSense in my WordPress.com blog?

WordPress.com does not allow you to add Google AdSense to your website unless you upgrade to the Business plan. For more on this topic, please see our guide on the difference between WordPress.com vs WordPress.org.

What is the difference between Google AdSense vs Google AdWords?

Google AdWords allows you to advertise on other websites, including those participating in the Google AdSense program.

Google AdSense allows you to make money from your website by showing ads on your website.

How do I get rid of Adsense Ads?

If Google Adsense is displaying too many ads or you’re seeing ads in random places on your site, you’re probably using Google Adsense Auto ads.

To turn off Auto ads, sign in to your Adsense account and go to Ads » Overview. Next, click on the ‘Edit’ icon next to your website. You can disable the Auto ads options in ‘Site Settings’ to completely remove Auto ads on your site. Or, you can select the ‘Page Exclusions’ option to disable Auto ads from specific pages.

We hope this article helped you add Google AdSense to your WordPress site. You may also want to check out our guide on how to increase your blog traffic, and the best email marketing services to grow your subscribers.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

442 CommentsLeave a Reply

  1. Dear sir,
    I have 2 question
    1) where can I get advertise to add in my AdSense account?
    Can I add other companies selling product like mobile, computer etc. Or as a affiliate associate can I add the company’s products in my AdSense account?
    2) Here is not showing about ‘Add Text’ & ‘Add URL’ . Should I write text in ‘Add Text’ and the URL in ‘Add url’ of the website where the advertise available ?
    Please tell me.

  2. Hello Sir I have been created my AdSense account and WordPress account.
    But I don’t have any computer or laptop. So I want to work using Android phone. When I login through UCBrowser there not appear my add button . Appear only three button Home , Performance and Setting. Please help me.

  3. hello sir,
    i am jagmeet singh brar a blogger.i have applied for google adsense. actually i am also using my gmail account for youtube google adsense.so now i want use google adsense for my blog

    i have used all the steps that you have described in your post. i also placed my adsense code in sidebar. I was applied for google adsense approxmately 15 days before. But till now no ads are showing on my website. even no email send to me by google adsense team. What will be the reason behind this?

    please help me sir. thanks

  4. Not sure why the bottom part of this article isn’t removed. The adsense placement in wordpress.com is no way can be done similar to the illustration.

    • Agree , somehow this doesnt work with wordpress. When i install the google plugin , it doesnt detect the codes and says “Use Ad Manager to place ads on your site. Learn more” in its setting page

  5. Please help me .. I want to create this type functionality into my wordpress adsense website like as when user first time visit my site only one advertise display. but when user refresh this page content display..so how can i do ..?

  6. Hi, When am adding Google Adsense link to Text Widget in WordPress, it is modifying the source provided by Google…? and I can see only html code on my website.

    Please help me as after so many times of rejection, I have finally got Google Adsense approval and now this issue has come.

  7. Hello, Please i applied for adsense two weeks ago, and i succesfully created my ad units. i was also given a publisher ID and a visible dashboard too. after two weeks of pasting the ad codes on my blog, i am yet to see any ads display all i see are blank spaces and disjointed codes like this one:adsbygoogle = window.adsbygoogle || []).push({});. I have a custom domain already which i got through wordpress. please what could be the possible cause of the ads failing to appear? My blog address is. I eagerly await your reply, Thank U.

  8. I tried to use the method in the article to setup AdSense for my wordpress.com blog but it doesn’t seem to be working since Javascript is not allowed. Is there some workaround for getting AdSense to work on wordpress.com?

    Thanks

  9. I used the text widget method. When I copy and paste the adsense code into the text area, I hit save and it changes it . I end up with just code on my blog home page where the adsense should be. How long is it before it shows up as an ad? Did i do something wrong here?

    • I have exactly the same question. I don’t even see anything on my home page. Do I have to wait until Google accepts it or what should I do? Google wrote me a letter that says when my blog is fully activated (what does it even mean?) then I can see adsense.

      • You have to wait for final approval. You will get a mail from google when you passed second review.

  10. Hey WpBeginner! Your tutorial was awesome (this is the only place from which I take a lot of tips reg WP).. Now heres My problem… Is it possible to know the Code given by my client is working or not I mean Its Google Adsense Code. I did as told but it dint show up.. So how d I know if it works or not!

    Pls help :)

  11. Hi
    I got adsense code for Blogger site and then I hosted site and migrated all content to new site.
    Can i use google adsense code for new wordpress site

  12. Hi, I have just started my blog and i’m on the free version of wordpress. Will i able to put up google ads on this version or do i need to upgrade my plan into a paid version to do so?

  13. I newly made an Adsense account and about 8 days has passed. Should I need to put Afs on newly made WordPress Site

  14. I paste this code on my website but after 5 days google send me a email and tell me our system is not detect code form your website please paste the code on your website but I already paste those code then why they told me again please tell me the reason thanks.

  15. Sorry, probably a stupid question, it was a great tutorial but I have one question. You did not mention what to do with the “Name” block on the Text Widget – your example shows it blank and you did not mention it in the instructions so I left mine blank. I inserted a text block/widget above the header – below the footer and on the sidebar with my code – (no name) and saved it. What happens next and do I name the Text Block area after an Ad shows up? Thanks for your time.

    • The title field in the widget allows you to add a heading to the text widget. This heading will appear before the widget content. Like in this case for example, you can add ‘Advertisement’ as the widget title. In other WordPress widgets like recent posts, WordPress automatically adds a widget title when you do not provide one. However, for text widgets if you do not add a title WordPress will not show it. We left it blank because most users don’t want to add a heading just before their ad.

      Admin

  16. Even if “Insert Adsense” plugin hasn’t been updated in more than 2 years, it works perfectly for me.
    In the last few days I wanted to change my main add on each page from a small one to a big one, and by only changing the HTML at Insert Adsense, all my pages changed at once. The other adds, stayed the same.
    It does exactly what it proposes…and works perfectly on my bilingual site.
    Here are examples of the same pages in two different languages:
    (Brazilian Portuguese)
    (English)
    Simple and great plugin.

  17. Thank you for this helpful demo. How would you insert ads into posts? Your video describes how to place them in the sidebar, but not the posts.

  18. I create a unit but is is different from your show here. Ads size is just only 7-8 for choosing?

  19. Hello
    Can I get approval for google adsenese with a free wordpress theme.
    How much time or posts are needed to approval.
    same free wordpress theme used by other peoples so it affect to getting ads.

  20. Hello,
    I have installed the wordpress adsense google plugin and inserted my ads using their ‘red pin’ system.
    On my adsense account it lists all the ads I have, however after 2-3 days still no ads appear? Although it says I have successfully created an ad.
    Do I need to still implement the code into my site for the next approval process to occur? or is that achieved with the ad placement? if so, where do i insert thecode?

    xx

  21. Hi, I have installed Google Adsense Plugin and when I login to Google Adsense, I see a lot of Ad unit. I want to customize my ad style but I think I have to edit it one by one. Also I didn’t create custom channels. I’m new to Adsense. Is there any method to edit ad style of all the ad unit at once?

    • Hey Ronald, did you ever find any answers? I am in a mess right now using this plugin myself! I have used GoogleAds for awhile, and have noticed better results by making custom channels and targetable ads. This week I am working on cleaning up my ads and channels, and hope to be able to do this while still using the plugin. So far, I it is looking like you can edit the name from a bunch of names and numbers to a custom name. Then you can create a channel and add those ads to them. I will let everyone know how this turns out! Good luck and hope we can help each other out!

    • hi i try this maney times but still my dosent show up i dont y is there any problam with my word press or bacuse i put my ad coad maney times plz let ma no
      thanks

  22. Hello,
    Can I get approval for google adsenese with a free wordpress theme.
    What are google policies for themes ?
    Is it compulsary to have a paid / premium theme?

    Please clear my doubts ?

    regards
    dhruvv

  23. I wrote the articles in 2 languages. English and Indonesia. Would be ok for this site?. I would like also adding Google Adsense to my wordpress, would this be a problem?
    Thankyou

  24. I have three adsense ads on my website, but each one requires it’s own Javascript – which is slowing down my page-load. Is there a way to put the Javascript code in one place so that each add does not call it’s owN js, css, etc?

  25. Nice information. I just want to know that if i design my website on “”abc.wordpress.com”” can i add adsense on it? I am very new in this field. so please advise me.

    One more thing. if i designed site like abc.wordpress.com can i move to abc.com directly? If yes please suggest me steps that how is it possible.

    Thanks in advance.

  26. I am adding the code I created as a first time user, when I go to my webpage to check how it looks it just shows up as the code, what am I doing wrong?

  27. Hi, I am trying to add google adsense to a blog post but when I add the code to the text I can’t get it to not overlap with my actual text.

    What is the best way to add the adsense code to the blog and make sure it is in the right place?

  28. Nice information but it looks like some of the video needs to be updated. For instance, in my WP widgets area, there is no “Main Widgets” and then when I go to “Footer Widgets” it really does not do anything at all.

    What am I missing here? Do you have an updated video to place this code in WP?
    One more thing. Is it mandatory that we place some type of words in the “Ads” area and the “blank space” that is mentioned?
    Not sure how Google is to “choose” my ads. Anyone know how this works?

    • The “Main Widgets” area varies from theme to theme. So this is not an outdated area of the video.

      Google chooses ads to display through crawling your website and searching for any relevant ads related to the content.

      The only thing you have to place is the ad code You must then wait for Google to do its thing. Ads will begin to show when they show. As long as you have an approved account and have your settings correct within adsense itself,. You should be fine.

  29. I have added the ad code on many places on widgets but why may ad is ‘NOT” showing on secondary widgets but same code is working on main widgets area the ad is showing there . please help.
    Regards

  30. I have applied for my own site with an existing Adsense account I’m using with youtube. I have created a new ad unit (vertical 300×600) and added the code to my blog’s sidebar. However, google still says that they need to find impressions of ad units on my page. I have done this three days ago and still I get the same message. Ads on youtube are working as usual and I’m earning from them. What should I do?

  31. Hey

    I have added adsense according to this guide and I’m still just getting grey boxes. i have searched the internet to find a solution and tried to contact adsense (which is impossible). I am adding the adds to my site nybil.org. but then I enter google Adsense control panel I am requested to ad the ads to my web site. It has been like this for days. Anybody have any idea what i can use. Or if it is unfixable what alternatives i have that works with wordpress.

    someone please help a frustrated dane.

    • Hi Simon I look your site and I saw that it needs more improvement. Google adsense will not approve site that not look professional. Just design and add more pages of your site, like contact sitemap, about us. Write more articles, do not populate your home page with more pictures, just write what about your site and your article posting.

  32. I will be honest – I ditched ClickBank and AdSense altogether from my blog….reason being there are too many merchants who’s products and services either get banned or leave ClickBank and as for AdSense, it gives visitors to your website another route to click and leave your site. If you have affiliate programs and products already on your site, you are guaranteed to make more money with them than through AdSense, unless your are driving some serious traffic.

  33. Thank you so much for sharing this informative tuto.
    I am new to WordPress, recently migrated all my blogger contents here,
    I am sure this will surely give some knolwedge to handle my page here.
    Keep up the good works
    Best
    ~ Philip

  34. Great article for beginners as always. I was looking the other day to find a way to place responsive Adsense on a site I’m doing. The info out there is a little bit confusing so I think an article about placing Adsense optimized for both, the desktop and the responsive versions of an website will be quite good.

  35. Hi Boby

    You are not breaking Google TOS by using Quick Adsense plugin. There are many Plugins like this to rotate Ads so that we can get some idea which ad perform better.

  36. The warning against the floating widget was VERY helpful as I was not aware and sure many others are not aware that plugin would cause a violation. Thanks!!!!!!

  37. I’d love some advice on how to get approved for AdSense. My wife has a food blog (NormalCooking.com) that averages 6,000-8,000 views a day (have even made it up to 41,000 views in one day) and we wanted to look into monetizing on her site. We have applied for AdSense 3 times and been rejected all three times. According to the rejection email, we fit into all the requirements set by Google to be approved. I’ve even emailed them via their “not being approved but get over 40k views a month?” page.

    This is a great tutorial and would love to implement the instructions once we get to that point!

    Any advice on ways to be approved for the program is greatly appreciated. Thanks so much!

      • Yeah, most definitely. I’ve been on there pretty frequently but nothing has really helped. I’ll keep probing though. Thanks!

    • Yes of course there more plug ins in word press that preety cool and easy. But remember to write more articles and design your template to look it professional. And add your site in webmaster before you getting approve.

  38. I’m using Quick Adsense plugin, so every time the user refresh the page the ads will be different. Is it break google TOS? sorry bad english

Leave a Reply to Jesse Kanner Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.