How to add AdSense to your WordPress website

how to add google adsense to your wordpress website

Google AdSense has long been a way to monetise your website.

In recent years you will find mixed reviews on whether it’s worth it or not but I’ve always found the best way to find out, is to do it yourself.

To try it yourself, you will obviously need to add an advert onto your website, so this article is going to guide you through the process of adding Google AdSense to the sidebar of your WordPress website.

Note: This will only work for self hosted WordPress sites, not

#1 – Register with Google AdSense

As with any Google service, you have to sign up for it before you can use it.

You can either log in with your existing Google account, or register a new one directly on the AdSense website.

If you can’t log in with an existing Google account, it could because that account is a Google Apps email address. Try registering a new account with an email address

#2 – Agree to their terms and policies

The policies are pretty straight forward. They consist of rules such as:

  • You must not trick people into clicking the ads
  • You must not click the ads yourself
  • You must have a privacy policy page
  • Do not edit the code they provide you
  • Do not display the ad within a popup

#3 – Build your advert

Once you are set up and activated on Google AdSense, you will be able to build the advert for your website.

To do this, log into AdSense, click ‘My ads’ then ‘+ New ad unit’.

This is the page where you can select the type of advert you wish to create, be it a banner ad for the top of your page, or a sidebar ad.

As we are building a sidebar advert, select the ‘300 x 250 – Medium Rectangle’ ad.

Feel free to play around with the remainder of the settings.

Once you are finished click ‘Save and get code’.

#4 – Add the code to your website

The ‘Save and get code’ above should have opened a popup that contains the code for your advert.

Adding this to your sidebar is pretty simple:

  • Log into your WordPress website
  • Go to Appearance > Widgets
  • Click and drag a ‘Text widget’ into your sidebar
  • Paste the AdSense code into the widget
  • Click Save

That’s it! You should now have a Google AdSense ad running within the sidebar of your website.

Note: If you have an ad blocker enabled you won’t be able to see the ad! – easy to forget.

Remember, if your AdSense adverts aren’t bringing in any revenue, then remove them and explore other avenues.

  • zack

    When i try to add the code into the text widget nothing happens…

    • Hi Zack, Did you get this working?
      If not, make sure:
      a) your website has a widget area
      b) you don’t have the “add paragraphs” option ticked.
      Hope that helps,

      • mogs

        I read you can’t do this with, you have to upgrade and go through their own adwords program?

        • grandhisila

          i m also facing same issue.what is alternative

          • Hi Grandhisila,
            Sorry for the slow reply – I’ve been away for a few months. If your website is a site, then unfortunately you have to use their own advertisement system, you can’t use third party services (like AdSense). If you manage to find something else that works, please let me know!


        • Hi Mogs,

          My apologies for the slow reply, I’ve been away for a few months but you are correct. You can’t use any third party advertising tools with, you can only use their system. I’ve added a note to the article above stating it’s only for self hosted WordPress websites. Thank you for bringing this to my attention.


    • Amy Estrada

      I’m having the same problem.

  • saurabh

    i did the above procedure but instead of adv i see a light yellow color filled space

    • Hi Saurabh,
      Is your website a self hosted WordPress website, or a one? If it’s unfortunately this won’t work, they only allow adverts from WordPress, nothing else (so no AdSense).
      If it’s self hosted, I’d happily take a look and see what’s going on if you drop me a link.

      • Julia

        I had the same result – A yellow filled box. I used bluehost to set up my wordpress site.

  • leopold

    I want it in my header

    • Hey Leopold,
      To add it to your header, you would need to drop the code into a header widget area if your theme has one, or into the code for the theme itself (probably in header.php after the code for any navigation).
      Hope that helps,

  • Thanks I didn’t know you could do this directly so helpful to find out!

  • anjan

    If i place 1 adsense code in 2 places in same blog, i.e, side bar, and also in post title, will it be problem for my adsense account?

  • adam clarke

    i got it to work fine

  • Nicely, you’re going to begin with a annuaire lien en dur.
    You should leave questions and be open to suggestions.
    I happen to live near a project I managed years ago and, as a result, I frequently see “my” project serving its
    intended functions and adding to the quality of life in the community.

  • Quality articles is the key to invite the visitors to pay a visit
    the website, that’s what this web site is providing.

  • But remember to use the pads of your fingers, not your nails.
    Limit wine to one glass a day or risk halting your body’s release of
    its own antidiuretic hormone, causing dehydration of your skin. Stay away
    from heavy drinking to keep your skin looking younger, longer.

  • prabhu

    This is not working for me after place the code in text widget again i re open then the code is not appearing. please help me.

  • One of those sellers called us and told us that their tenant moved out
    of a house they owned and they did not want to be landlords any more.
    The availability or applicability of any type of mortgage
    or finance raising scheme discussed in this article is something that
    needs to be determined on an individual basis therefore this article does not constitute advice.
    Each house gets assigned by the asset manager to a realtor who is a listing
    agent for the asset manager (bank).

  • Suction – The effectiveness of a vacuum cleaner suction would rely on many
    factors. If all your relatives users are a person or more
    among by far the most frequent to try and do with some cat or
    dog entrepreneurs then component seriously tends being that critical enchanting all your relatives for extra data on investigation as well as for that vacuum cleaner that may
    well be of aid all of your spouse and children members get rid
    of each strand obtaining to do with hair about your a substitute You’ll
    be the case able to understand more about then recognize a multi functional cleaner
    atmosphere within the your authentic – est despite the
    fact that also enjoying moving to become the company getting to try and do with the cat
    or puppy. You will only need to vacant a bagless
    vacuum when it exhibits how the canister is full.

  • Let the color develop for about three hours, and then add
    bronzer for cheeks, nose, and forehead to complete the perfect look.
    Film make-up artists apparently always know
    what the actor has been doing just by the way their skin feels.
    The finest self-tanning product manufacturers have a range of tanning creams, lotions, and sprays that you could try to see which
    suit you best.

  • This crystal candle set can be placed on dining room table to
    create a wonderful atmosphere for special occasions.
    As everything can now be accessed on the Internet, it seems that
    I can easily do errands or spend my work hours with my
    fingers doing the job, well, done. Now comes the second part; what you choose to give as
    a gift and what it signifies.

  • What if you don’t KNOW what the gift receiver likes.

    For this reason, most of the companies like the above mentioned are desperately waiting to revert to
    the request they receive for baby free gifts or baby gifts online.
    Subscribe to the Sales & Deals Examiner for instant email updates on more last-minute holiday

  • com credit card and receive $10 off your order upon acceptance.

    But just like in fashion, where you have so many
    choices to hide certain curves and to embrace others,
    swimwear designers have made the same fashion advances to give women more choices when they pick out their summer swimwear.
    t wait for those steamy, hot days of summer so she can break out her
    bikini and confidently strut her stuff on the beach and by the

  • Cheap is costly and you ought to opt for the best
    electronic cigarettes. Where before a smoker may have had to wait
    to smoke, now the e-cigarette makes getting a nicotine fix easier than ever.

    Investigate pricing and purchase options and how these cool gadgets can work for you.

  • When using light coloured paint over a dark coloured surface, i
    suggest you apply a high quality primer sealer. And most of all, investing on home
    energy generation system will definitely help the environment for it only uses harmless and clean source
    of energy. The trusses can be installed 2 feet on center with a h clip in center span between the trusses for support.

  • Along with detailed product information and efficient customer service, Pex – Supply.

    And most of all, investing on home energy generation system will definitely
    help the environment for it only uses harmless and clean source
    of energy. Objective: This is the first thing to consider when buying.

  • The kegel exercise helps prevent both urinary
    incontinence and hemorrhoids, and increase the flow of blood to the
    genitals. ‘ The most effective technique of penis enlargement is stretching.
    Basically, male enhancement can be done in various
    ways, using different procedures and different products that will
    possibly work best for a particular person.