Google AdSense is one of the easiest ways to earn money from your website. Over the years, we’ve guided many bloggers through monetization struggles, and AdSense has proven to be a dependable solution.
With Google AdSense, you can automatically sell your website’s ad space to advertisers and get paid. The best part? There are virtually no requirements to get started, making it accessible to bloggers of all levels.
Whether you’re a seasoned blogger looking to diversify your income streams or a newcomer eager to start making money online, Google AdSense offers a fantastic opportunity.
In this article, we’ll show you how to add Google AdSense in WordPress, along with some best practices and tips we’ve learned that can help you increase your earnings.
![Properly adding Google AdSense in WordPress How to Add Google AdSense to WordPress site](https://www.wpbeginner.com/wp-content/uploads/2020/03/how-to-add-google-adsense-to-wordpress-site.png)
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 an 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
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 Choose your unit](https://www.wpbeginner.com/wp-content/uploads/2020/03/choose-your-unit.png)
Next, you need to provide a name for this ad unit and select the ad size and type.
![Name ad unit and choose ad type Enter details and select size](https://www.wpbeginner.com/wp-content/uploads/2020/03/enter-details-and-select-size.png)
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. See our guide on the best Google AdSense banner sizes for more details.
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 ad code Copy the code](https://www.wpbeginner.com/wp-content/uploads/2020/03/copy-the-code.png)
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 Add custom HTML widget block](https://www.wpbeginner.com/wp-content/uploads/2020/03/add-custom-html-widget-block.png)
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 Enter code and update widgets page](https://www.wpbeginner.com/wp-content/uploads/2020/03/enter-code-and-update-widgets-page.png)
For better placement control and tracking, we recommend checking out a WordPress plugin like Advanced Ads or AdSanity.
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.
![Generate auto-ads code for Google AdSense Get code for auto placement](https://www.wpbeginner.com/wp-content/uploads/2020/03/get-code-for-auto-placement.png)
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.
![Auto ads code Copy and paste the code](https://www.wpbeginner.com/wp-content/uploads/2020/03/copy-and-paste-the-code.png)
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 to 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 WPCode.
![WPCode WPCode](https://www.wpbeginner.com/wp-content/uploads/2020/03/wpcode-site-max.png)
WPCode makes it safe and easy to add header and footer code in WordPress, without editing your theme files. This means that you’ll be able to save your ad code even if your theme changes.
First, you need to install and activate the free WPCode plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.
Note: The free version of WPCode has everything you need to add custom code snippets to your site. However, if you want advanced features like conversion pixels, scheduled snippets, code revisions, and more, you can upgrade to WPCode Pro.
Upon activation, go to the Code Snippets » Header & Footer page. From here, you need to paste your Google AdSense code in the header section.
![Insert ad code in header Paste Google Adsense code in the header using WPCode](https://www.wpbeginner.com/wp-content/uploads/2020/03/paste-google-adsense-code-wpcode.png)
Don’t forget to click on the ‘Save Changes’ 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.
Related: See our guide on how to add header and footer code in WordPress for more details.
You can also use the WPCode plugin to automatically display Google AdSense ads in specific areas like before the beginning of a post, after a post, before or after a paragraph, and more.
For step by step instructions, see this guide on how to insert ads within your post content in WordPress.
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.
To learn more, see our guide on the highest performing Google AdSense banner sizes.
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 toward 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.
To learn more, see our guide on how to prevent invalid AdSense clicks in WordPress.
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.
You may also want to see our guide on how to set up Google Ads conversion tracking in WordPress.
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.
Syed Balkhi says
Hey WPBeginner readers,
Did you know you can win exciting prizes by commenting on WPBeginner?
Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
You can get more details about the contest from here.
Start sharing your thoughts below to stand a chance to win!
Maarten says
Are ‘floating banners’ the same as a banner in a “fixed” widget? Because the article mentioned it’s not allowed by AdSense to use floating banners/banners on fixed positions, but I see a lot of big publishers doing it?
Irah says
Hi, So I have a wordpress site and only have a Premium plan on it, it looks like I can’t use or install plugins that would help me run Google adsense on my site, Do I have to change my Premium plan to Business plan? Or are there any other ways?
WPBeginner Support says
Hi Irah,
WordPress.com business and premium plan allow you to use their own advertising program called WordAds. If you want to monetize your website using Google AdSense then you will need to move it to WordPress.org.
Admin
Georgia says
Hi. So I’m trying to set up my Google Adsense account on my WordPress site. But it keeps telling me that there are errors in the HTML. What should I do?? I copied the exact link that Google gave me.
Malte says
Hi @Georgia firstly you need to copy your own google adsense meta code and paste it in your theme header between then save that file header.php go to wordpress and paste your text ads, banner ads or any other google ads code, Thats all
BIKRAMJIT says
Hi
Thanks for the article. I am little bit confusion at one point, if I use two different gmail account for google webmaster tool and google adsense for the same site, will be any problem there?
WPBeginner Support says
Hi Bikramjit,
No, you can use two different accounts.
Admin
Jesse Kanner says
Very helpful video! The process was so clearly described. Thanks for making it.
Vane says
Hello,
I have a problem activating my Adsense account.
When I registered my Adsense account I added this version of my website, instead of my actual version of the website
The code is properly added, I added it with a plugin and checked it twice.
But, the problem is that I received an email by Google that says that I haven’t taken the final step to activate my account.
What do you think, is the submitted wrong version of the website a problem?
Solomon King says
I currently use a free WordPress.com blog. However, I want to run Google Adense on the account and other custom design.
How do I move my blog to a paid WordPress.org blog since the paid versions of WordPress.com blogs have many restrictions?
Please help.
Thanks
WPBeginner Support says
Hi Solomon,
Please see our guide on how to move your website from WordPress.com to WordPress.org. You can also take advantage of our free blog setup service.
Admin
Cezar says
How to stop smart ads showing in widgets are i get 3-4 ads in the right widgets area and i only want 1 ads in that area
WPBeginner Support says
Hi Cezar,
If you are using a plugin to display ads then see your plugin settings. If you are adding the ad code in a widget manually, then please choose the correct ad unit and size your AdSense account.
Admin
Cezar says
I don`t use any plugin for ads I use new smart ads from adsense and it`s adding 3 – 4 ads to my right widget area (how can i stop this i only want 1 add there not 3-4ads….)
Thank you
Swarnali says
I have opened my blogging site in WordPress last week. Now I want to monetize my site. But I can’t understand whether to go with the WordPress Premium plan or purchase Go Daddy Deluxe plan or do anything else to add Google Adsense….pls suggest me….
WPBeginner Support says
Hi Swarnali,
It depends on your budget and requirements. Please see our guide on the difference between self hosted WordPress.org vs free WordPress.com blog.
Admin
Richie says
I inserted html code from adsense into my wordpress website and it says Tag is not allowed. There are 2 errors which must be fixed before you can save. kndly please help me Out…
Vaidees says
Hi, I have one month old website, has 17 posts and google Adsense rejected my site. I have placed some other Affiliated Ads on my website, My questions are because this my website got rejected or what?
WPBeginner Support says
Hi Vaidees,
Please review AdSense program policies to learn more about their requirements.
Admin
humayoon says
i have placed code but it shows error when there is script.
Please guide what can i do?
Daniel says
Very helpful! I’ve made some ad units and have tested them on some templates within my site. The ads are showing content. BUT, I have not inserted the “place this code between the header tags” directions from Google.
I’m wondering if inserting the code in the page header is necessary (if I’m seeing ads already). Thanks for the video!
Saddam Kassim says
No, it is not necessary to place the code in header section if your ads are showing in the sidebar or at your desired location on the site.
Lori Bosworth says
Hi, I’m trying to add Google Adsense auto ads to my WordPress.org site. In particular, I chose the ads that appear between paragraphs. I got the code from Adsense and added it to my theme header.php file between the and tags, but the ads aren’t appearing yet. Did I add the ad code in the wrong spot? If so, where should I add it? Thanks, Lori
WPBeginner Support says
Hi Lori,
If you have placed the ad code correctly, then ads will start appearing soon. If they don’t, then you can try other solutions to manage ads in WordPress.
Admin
Tyler says
So it’s a real pain when you keep going through multiple tutorials all over the internet, bashing your brain in because you think you’re missing something when it turns out that AdSense isn’t available for any WordPress blog below Business Plan, which is ~$21/month.
This article explains that in a very small blurb at the very bottom of the article in a Q&A section.
There should be a requirements section at the very beginning so people don’t waste their time trying to get something to work when they don’t meet the requirements…
Aadarsh Shah says
I can’t sign up even. When I put my WordPress url, Adsense says that it can’t have a subdomain or a path.
Please help
Chavinesh Mukund says
Hi,i have connected my site to adsense after 12 hours an email arrives that connect your site but till now my account is activating. Plz help
Vane says
Same problem here. Have you solved it?
Michael Hutton says
I copy and pasted the adsense code and keep getting error Tag not allowed.
Editorial Staff says
Is your site on WordPress.com? They require their business plan to use Google Adsense.
Admin
shaaa says
Hi,
I already got Google Adsense Approval for my website and it is running and ads are on live.
Now I would like to get Media.net,Infolinks,bitvertiser,revenuehits and also Popads.
My Questions:
1.when we apply for other ad networks should we hide google adsense ads (any other network ad)?
2.If we off the google adsense ad from our website will they suspend or delete my account?
Jerry says
Please help. Where about do I paste my code in HTML.
WPBeginner Support says
Hi Jerry,
You need to paste the code where you want the ad to be displayed. For that you need to study the code to understand which code is used to display different sections of your website and then paste your AdSense code accordingly.
Admin
Rajender says
Can I use AdSense on festival wishing website
WPBeginner Support says
Hi Rajendar,
You can use it on any content rich website with unique useful content.
Admin
Kumar says
Hi. How to hide adsense ads in android webview but not mobile or desktop browser?
Recently I hired a developer to make a Webview App of my wordpress website.
I am using Adsense on my website. Now I would like to use Admob on my App.
I can see google adsense ads on my Webview App. How can I stop adsense on webview android app?
Talha Munawar says
Thank You So Much iwant to ask can you please check my web and tell where should i place my ad units can`t uderstand
waiting for reply
WPBeginner Support says
Hi Talha,
The most often recommended ad positions are those that are visible to the users when the page loads. This includes below the fold banners, sidebars, and ads inside post content.
Admin
Mazhar khan says
This is easy way to add google adsense but how to improve google adsense income ?
Tushar says
to get the approval from adsense adsense shws that paste this code in your website and click on cnfrm .so where this code will be paste to get the approval from adsense
Charly says
I’ve installed the AdSense code using the plugin “Insert Headers and Footers. But one of my blog posts violates AdSense policy.
Can you tell me how to disable AdSense for only that post?
Abbasi says
I have placed the codes the way u did but couldn’t let it have please resolve the issue they are looking like this they aren’t being showing up please tell me.
Kristie says
I’ve had ads on my site for a while but all of the sudden I see “Google Not Defined.” They were in the pasted in the widget area. Do you know what could be causing this? I’ve searched online and see very little info. Thanks!
shelsa says
Hi, my wordpress.com blog is hosted on bluehost. I pasted the adsense ad code but it shows a blank space. Could you help please?
Deepak says
Facing An Error ads by Google is not defined when it add ads in header
Felisa says
Thank you very much for providing us useful articles. I have been trying to figure out how to use adsense in my wordpress blog and finally I came upon this article and yes, I got it. Thank you very much.
adebimpe says
Hi, I added the adsense code in the custom html area of my widgets and it only shows a blank space. I would like some help. Thanks.
Abdur Rahman says
Hi
My wordpress hosted domain blog is google adsense approved but i can’t do code on wordpress as my adsense account is connect with youtube account now my problem is i try to do with plug-in google adsense but not available then i try to do with adsense ad units even my adsense not showing add unit please tell me how can i do that .
Himanshu kumar says
My website is in wordpress.com i m applying for google AdSense but the problem occur difficult site navigation what can i do
WPBeginner Support says
Hi Himanshu,
You cannot use Google Adsense on your WordPress.com account. Please see our comparison of WordPress.org vs WordPress.com.
Admin
Gilbert Mutange says
Actually you can use adsense on a WordPress.com site if you upgrade to a business plan.
WPBeginner Support says
Hi Gilbert,
You can use WordAds program to monetize your site. All business plan websites are pre-approved to run WordAds.
ashish says
Hi
Thanks for such a good tutorial.
I put it Google AdSense as per your tutorial, but some how it is not working in my site.
When I debug it I found 403 error, can you help me for that?
Thanks in advance
Nate says
This doesn’t work any longer as is not allowed in either text or custom html placement on WordPress. Any wordaround?
Piyush says
WordPress in now upgraded so tell me according to the new version?
Ajit says
Need help to setup ads on site as google AdSense is now upgrade
Ajit says
Currently I’m working on this AdSense part, And Google AdSense is improved now as compared to before. Need help to set up ads on site
Zahidul Islam says
Very informative and usable article. I was unknown about adsense code placement on wordpress site. It really helped me. Thanks .
Yaz says
Hey, I applied for Google Adsense but the AD doesn’t seem to work on my blog. Rather than showing an AD, I get a link.
Laura says
Thank you! This was super helpful!
frozegist.com says
I found this post very helpful and captivating…thanks so much….
Kristen says
Hello, I am trying to get started with AdSense on my Word Press site. I have no idea where to paste the initial code they give you so that my account can be approved. Can you help me with this? Thank you!
Ankit says
Its simple.
Download this plugin – Per page head
and paste the adsense code in tag area.
Jason says
Are you able to put google ads on WordPress’s personal plan?
WPBeginner Support says
Hi Jason,
Please see our guide on the difference between self hosted WordPress.org vs free WordPress.com blog.
Admin
Rattanak says
How can I put code ads into my wordpress (premium plan)? I don’t know where!
Constance Kamau says
I am unable to open a google adSense account with this blog address
WPBeginner Support says
Hi Constance,
You cannot get Adsense on your free WordPress.com blog. You will need self hosted WordPress.org website for that. Please see our guide on the difference between self hosted WordPress.org vs free WordPress.com blog.
Admin
Mae says
Thanks for this!
Does Google Ad Policy allow promotion of websites through social media like Facebook and Twitter? As long as I don’t ask people to click the ads?
WPBeginner Support says
Hi Mae,
Yes, you can promote your website using social media platforms.
Admin
Jay Carrington says
I just copied the code onto my sidebar. However, the code is visible on my dekstop site. I;ve been told that it will take around 3 days for them to review my site.
After my site has been reviewed and okay’d will that coding then turn to adverts or should that coding not be visible at all?
Sidra says
Hi,
When I add my blog URL it’s telling me that it’s not valid. This is confusing me!