Adding AdSense Code

updated Jan 23 2016

Note: for adding codes to Blogger, see "Putting Your Adsense Code on Your Blogger Blog".

Frequently we find new publishers confused about how to add the Adsense ad codes to their websites after they've generated the code from their Adsense account.  Adsense gives basic instructions for publishers using an html editor to add their codes, but beyond these most basic instructions Adsense has little to offer in the way of assistance.

That's because there are hundreds of different website creators available in the market place - some free, some paid; some downloadable programs, some online builders and some are "CMS" (content-made-simple) style like blogs (such as wordpress and bloggers), and others like Joomla, CMS-MS and Drupal. Adsense can't possibly provide instructions for every different type of website, and it's up to the webmaster (in most cases that will also be the publisher) to learn the basic functions of their website creator, including how to insert html or javascript.

I won't be covering the "how to" for all of these either, but I've searched out some of the ones we are most frequently asked about in the help forum, and provided links to the places where you can find the instructions for inserting Adsense, or where you can and should ask for help. Inserting the Adsense ad code into your particular type of website is not one of the things covered by the Adsense help forum, unless one of the volunteers has experience with that particular web builder. Better help will come from the help centers and/or forums, or from other users of your website software.

Webs.com (answer found here and written by Webs Helper)
To add adsense across your entire site, you should enable sidebars, then edit your sidebar and add a new "Custom Module". From there, choose the <> icon and paste in the Adsense HTML code. This will add it to all of your pages.
To add adsense ads to a specific page, simply edit the page, click into a paragraph and click the "HTML" icon in the toolbar. Then paste the Adsense code into the box.

Web.com free sites:

Free sites are not permitted to use google adsense. If you want to use Google Adsense, please upgrade to any premium service.

They also recently removed the html gadget, which means free hosted sites cannot place an AdSense ad (or any ad that requires html access) on free sites hosted on webs. You would need to upgrade to premium services.

Section 18 of their Terms of Service: http://www.webs.com/terms-of-service

Removal of the html widget on free sites: http://webs.zendesk.com/entries/26042695-HTML-Module-No-Longer-Available


SquareSpace

Implement Adsense on SquareSpace using a code block.

Note that it doesn't appear that SquareSpace is (currently) using the AdSense Host Api. That means you can't apply for AdSense with a SquareSpace URL. You need a top level domain to apply for Adsense.

http://help.squarespace.com/guides/can-i-place-advertisements-on-my-site


Weebly Sites

Use the Weebly Google AdSense element to add AdSense to your site.

Note that as of Oct. 2013, weebly reduced their revenue share amount so you keep 100% of your earnings from weebly sites you monetize with Adsense.

Weebly uses the Adsense Host Api so you can apply directly through the dashboard of your Weebly Account.

http://kb.weebly.com/adsense.html

http://blog.weebly.com/2/post/2013/12/a-holiday-gift-google-adsense-revenue-now-increased-to-100.html


Wix.com

UPDATE for WIX: In January 2016, Wix removed the Adsense widget from their website builders. How long this is for, or if it's permanent, I don't know. But if you're planning to use Wix for your site building and hosting, it probably is not going to work with Adsense any longer. At least not until Wix replaces the app. Their notice says it's temporary. See this page in the Wix Set Up.

Although you can use Adsense on wix.com sites, and I believe they are using the AdSense Host Api, Wix sites are difficult to get approved by Adsense. Their new site template coding contains javascript which the actual content is contained inside of. AdSense approval crawlers are text based, and cannot execute javascript. That means that the crawlers see no content on the wix sites submitted for approval. Most end up being rejected.

Until Wix fixes or changes this, it wouldn't be my first suggestion for building a website, not unless you already have an approved AdSense account. In that case, you can use Adsense on your wix site.

Adding AdSense to Wix: https://www.wix.com/support/html5/apps-made-by-wix/google-adsense/kb/adding-and-setting-up-the-google-adsense-app


Google Sites

Adsense is no longer available for websites/blogs hosted on google.sites. This changed in October of 2013.

Those who already have Adsense on their sites will retain the ads they have, but ads cannot be updated, nor changed. If you remove an ad to replace it with a different size, you won't be able to.

See google.sites help: https://support.google.com/sites/answer/3156640?hl=en


Yola (yolasites)

Information on adding Adsense to your yolasite is available directly from a Yola Tutorial, found here.


Yahoo Sitebuilder

Help for those using Yahoo's Sitebuilder can be found in the webhosting support sections, both here at this page, and here at this page. You can also contact support directly at Yahoo from your account.


Microsoft FrontPage

Help installing Adsense to your website built with Microsoft's "FrontPage" website builder can be found on e-How at this page. 


Dreamweaver

We get frequent requests in the help forum for using Adsense with Dreamweaver. One of the best instructions can be found in Layers Magazine in this article.

Wordpress.com

AdSense cannot be used on wordpress.com sites, not even if you purchase a custom domain and map it to your blog.  A domain name is just a name, and the blog itself is still being hosted by wordpress.com.

Wordpress forbids AdSense on their free hosted blogs. However, if your blog has a lot of traffic and is very popular, you can apply for Wordpress' own form of advertising to use on your site.

WordAds: http://en.support.wordpress.com/advertising/


Wordpress.org

In order to use Adsense on a Wordpress-built website, you need to have a self-hosted wordpress blog from Wordpress.org. Help inserting the Adsense code to your self-hosted wordpress blog is best found at the Wordpress.org Support Forum.

AdSense has recently launched their own wordpress plugin for adsense.

Information here from the Adsense Help Center: https://support.google.com/adsense/answer/3380626?hl=en

Download the official plugin from here: http://wordpress.org/plugins/google-publisher/


Tumblr

You cannot apply for AdSense with a tumblr URL. If your tumblr blog has a TLD, and also has sufficient text (all pictures and no text usually means rejection), you can apply at the AdSense home page. Note that you must be 18 to apply.

Use the customize option from Tumblr's dashboard to add your AdSense code. Choose the "theme" tab, and then select "custom html". Scroll through the blog's code and insert the ad code where you want the ad to appear (note that this needs to be after the initial <head> code, but it's often better to place it within the body section after <body> and before </body>. It depends on where you want it. If you are not familiar with adding code in html, you can find further instructions here (however, the article is wrong in that you can no longer apply for AdSense directly through the tumblr dashboard):

http://www.howtogeek.com/howto/22559/how-to-add-google-adsense-to-your-tumblr-blog/


Drupal: http://drupal.org/node/162440


Joomla: http://extensions.joomla.org/extensions/ads-a-affiliates/google-ads


Livejournal (only paid or permanent accounts): http://www.livejournal.com/support/faqbrowse.bml?faqid=299


WindowsLive Writer Plugin for AdSense: http://labnol.blogspot.com/2007/10/google-adsense-plugin-for-windows-live.html

Adsense Revenue Sharing Sites

Revenue sharing sites that allow you to post articles or videos and earn money from your Adsense account often have their own methods for getting your ads on your article. In some cases, you may only need to insert your Pub ID#, in others you may need to insert your entire ad code, and in still others (such as YouTube), the ads are put on the site/video for you. In cases where you have no access to the html portion of your website, you will not be able to insert ad codes, like on YouTube, so the administrators of the revenue sharing program would do that for you, and probably only require you to either follow instructions to link the account to your adsense account. In almost all cases, these websites have a help section that explains how to use their revenue sharing program if you are approved for it. Below you'll find a list of often-used revenue sharing sites, and links to their information pages.

HubPages.com:  http://hubpages.com/learningcenter/signup-AdSense

On HubPages if you don't have an adsense account and want to sign up for one you need to go to "My Account", then select "Earnings", then "Settings". Click on the "get started" button and follow the instructions from there.

If you have an Adsense account already, when you select the "Get Started" option choose the "Yes" option and fill out the required information - the email address you used to sign up with adsense, and the last five digits of your phone number, and your postal code. This information should match what is in your adsense account. Select the "Link My Accounts" option.


InfoBarrel.com: http://www.infobarrel.com/How_To_Get_A_Google_Adsense_Publisher_ID?ref_id=8370

Xomba.com: http://www.xomba.com/overview

FreeRange StockPhotos: http://freerangestock.com/index.php

MediaFlix: http://www.mediaflix.net/FrequentlyAskedQuestions.aspx


About.com

http://beaguide.about.com/
http://beaguide.about.com/cwcomp.htm (not adsense, but other compensation)


She Told Me: http://shetoldme.com/100-adsense-revenue-sharing


There are many other revenue sharing sites on the web, these few are some of the more popular ones that I know are reasonably well accepted by Adsense. Other sites may be equally well accepted, but I suggest that you research the site very well before signing up for any sort of revenue sharing plan on any site that offers it.  Find out everything you can first, before signing up:
  • read the site terms
  • check the site quality using online web tools
  • check google site rank and alexa ranks to see how many people use the site
  • read reviews of the website from other users - both past users and current users
  • read the site FAQ page and "About" page
  • check the site privacy policy
  • do a "Google" search on the website and find out everything you can about it
Once you do all that, if you are satisfied with the results, you can decide whether to sign up or not.

by J.Gracey Stinson