SEO, Technology, Tutorials, WordPress

How To Add Google AdSense Verification Code To Your WordPress Site

April 17, 2017

After you started blogging for a while, you begin to wonder how you can start monetizing the content on your site. Initially, you may not have applied for Google’s AdSense because you didn’t meet their requirements. However, your blog has begun growing with quality and quantity content.

One of the most confusing things regarding Google AdSense is adding a verification code to your WordPress website to verify ownership which is essential to getting the site reviewed and eligible for AdSense. You are instructed to add the code provided by Google to the HTML of your site, right after the <head> tag. Other than that, there aren’t any specific instructions on how to accomplish this on a WordPress site. There is often a confusion pertaining what the verification code means. A Google AdSense verification code is simply not the AdSense code you use to enable ads. Rather, the verification code is for verifying your site.

There is often confusion pertaining what the verification code really means. A Google AdSense verification code is simply not the AdSense code you use to enable ads. Rather, the verification code is solely for verifying your site which is the first step to getting Google to review your website to see whether you qualify for placing AdSense ads on your web pages. Without the code, your site will not have a chance in being approved.

In this article, I will illustrate how you can add the Google AdSense verification code manually and safely at the same time to your WordPress site without causing any errors.

1. Copy the code provided to you. Sign up for Google AdSense if you haven’t already.

To obtain your unique code, you must first sign up for Google AdSense. It is a quick and easy process. Once you have provided the relevant information, the code will be provided to you immediately to place on your site.

Google AdSense verification code added to my site. Google starts the review process.

 

2. Login to your FTP client securely with SFTP.

The next step is to login via SFTP which is typically port 22.

Go to your /public_html/wp-content/themes/folder

folder‘ is replaced with the current WordPress theme name you are using on your main site.

Once you are in the theme folder, look for the header.php file.

In this tutorial, I use the popular FileZilla FTP client to demonstrate this.

The WordPress theme header.php is the only file you need to modify to insert the Google AdSense verification code.

 

3. Right click the header.php file shown in the image above and click on ‘View/Edit’.

Open the header.php file in a word processor like TextEdit on OS X.

Note: Please make sure to download/copy the original header.php file prior to any modification just to be safe. Any improper alteration to header.php can render the whole site unusable.

Scroll down header.php in the word processor until you see the following code:

<?php wp_head(); ?>

</head>

 

The highlighted blue is the key area where we’ll be inserting the Google AdSense verification code into the WordPress header.php file.

 

Insert your own verification code before closing the header tag to ensure that everything goes smooth. Be extremely careful not to overextend and edit other areas of the header.php file.

 

The highlighted blue is the area where I placed my own verification code.

 

As you can see, insert the Google AdSense verification code after <?php wp_head(); ?> and before the end of </head>.

Essentially, the code is placed “between” exactly like in the image above.

4. Save your changes. Upload your edited header.php file back to your web server.

The header.php is the only file you’ll ever need to modify for verification purposes.

5. Submit your site for review on Google AdSense.

Like the first image shown, you will see a green checkmark with the message from Google: “We’re reviewing your site.”

Google says that the review process may take up to three days. But realistically, it’ll probably take a week or even a month depending on the circumstances.

I genuinely hope this tutorial has helped you.

If you have any questions, feel free to leave a comment below.

You Might Also Like

  • I have done the same and received a notification reviewing takes 3 days and it has been over a week . What shall I do ?

Back to top
%d bloggers like this: