How to add AdSense code to my website

I recently got AdSense approval. But I am unaware of the method to insert the the code. Can anyone tell me how I can add the AdSense ads to my website?

There are several methods to add your AdSense code to your website. But every one of them aiming a single target which is adding the code in the <body> section of your website pages. Where the ad codes are applied varies based on your requirement. Regardless of the ad position, all the AdSense ad units should be between the <body> and </body> tags.
Coming to the matter, here are the methods to add the AdSense code to your website.

Add AdSense code to a static website

If your website is not using any CMS, it is extremely easy to add the AdSense code. You just have to

  1. Create an Ad unit in AdSense (Fill the required fields and choose correct sizes)
  2. Click on the Get Code link under your ad in the My Ads section
  3. Copy the ad code
  4. Simply paste it in your HTML source code.

Insert AdSense code to a WordPress website

If you are using a WordPress website, you will need to create a text widget and place your ad codes in that (for sidebars or other widget areas.) Or simply use the plugins like AdSense Plugin WP QUADS which allows adding any type of ads on different sections of your website. You can refer to their FAQ section to know how to use those plugins.

2 Likes

I have a WordPress website, so should I use the plugin that you have mentioned? Or do you have any other recommendations?

The WP QUADS plugin is the best option as long as you are not planning to extremely customize your ads and ad placements. However, you could also try any one of the following AdSense plugins.

2 Likes

I personally tried many AdSense plugins which allows adding ad codes to the posts and pages of the WordPress. Among all of them, the WP QUADS plugin provided the best results. It is actually a revised version of the Quick Adsense plugin which was one of the best in its kind. So, WP QUADS might be the best choice. But as @Lakshmi listed, any one of those plugins can also do the job.

1 Like

Ok. I am going to try the WP QUADS.