July 15, 2019

Add Adsense Ads below every Post title [2019]

Hi friends! In most of the websites that you have had visited, you might have seen that there are Ads from Google AdSense.

Well, that is nothing crazy. But, what I have also seen is that few among them contain ads right below post title and that too in every single post.

The question arises that is this possible for any approved AdSense account holders (whose blog is linked to Adsense)? and does this help in any way?

Read this post till the end, as all such doubts will be cleared within it, and show you how to add AdSense ads below every post title?

Adsense Ads below Post title
AdSense Ads below Post title


How To Create Google Ads?

Step 1. Login to your Google AdSense account.
AdSense Dashboard
AdSense Dashboard

Step 2. Navigate to Ads Menu and click on Ad Units. Click on any one of the tabs to create a new ad unit.
Create New Ad Unit
Create New Ad Unit

Step 3. Give your Ad Unit any name for identification purpose. I usually put names based on where I wish to add them.

Save New Ad Unit
Save New Ad Unit

You can choose between Square, Horizontal or Vertical Ad Unit Display format. On the right hand corner you'll find Drop Down menu to choose between a responsive and fixed size Ad Unit.

It is highly recommended to use Google Ads in Responsive format (especially after the recent Google AdSense Update). Lastly click on Save to get your new Ad Unit.

Step 4. Head over to AdSense Ad Convertor and parse this Ad Code to xml format.

Step 5. Copy the parsed code and save it in another note editor app.

Why add this code below Post Title?

Basically friends, for those who are new to blogging and find it difficult to attain a certain earning target, they find that due to less traffic or even with decent traffic the revenue they get from the ads shown on their websites are not considerable.

This might be because of the lesser number of ad units on the template of your blog, or because you did not place ads in the right place. For instance, of 1000 visitors to your blog, hardly 10-15 people on an average will read your full content.

There are again say 6-7 visitors actually reaching till the footer area, where you might have added ads. So that is the situation that the visitors are reaching till the end.

However, if you had added some ad codes right below the title itself then that ad section will definitely gain more impression from the visitors, as all of them start reading right from the beginning of the post. Thus, an ad located there might be probably clicked by some interested visitor.

Show Adsense Ads below post title

Step 1. As usual, the first step involves signing into your blog and also the Adsense account.
Step 2. After you are logged into your blog, head over to Themes menu and Click on the Edit HTML button.
Step 3. After the HTML code box is on the screen simply press Control+F in the Code area to turn on the find box, and type <data:post.body/>. Press Enter.

You might get to see more than one results in the blog search, simply head over to the second search result.

Step 4. Once you reach to the second result in the HTML box then you have to paste the ad code from the AdSense ad unit above it. It should look somewhat like the one you can see below.

Adding Ad Code
Adding Ad Code

Note: While pasting the ad code remember to remove the space between async src else you will end up with an error.

Remove space between async and src
Remove space between async and src

Step 5. After you have successfully pasted the code, you got one task to do, click the Save Theme button.
Step 6. Come back to the blogger homepage and go forward to any post. You'll see ads are right below the title.

In the case of newly published posts, it will take some time for ads to flash.

Video Tutorial:

How does AdSense Ads below Title help?

Friends, it is a tiresome job to add these codes to individually every single posts in your blog. Especially if your daily posts are about 20-25 minimum.

So, it is profitable via this method to add the code once right in the template's HTML code and relax. Every time a new post is published then that will automatically load ads into its position below the title.

This helps the content creator to earn much faster and also keep a better impression.

If at any steps you are confused then feel free to comment below. Also, you may choose to subscribe to newsletter from the box in the footer.

July 08, 2019

Google RankBrain [2019]: The Definitive Guide

Announced in 26th October 2015, RankBrain is Google’s latest big algorithm when it comes to search and SEO.

If you are interested to shine out SEO of your blog, you must know about Google RankBrain. Why? Let's find out.

Google RankBrain: The Definitive Guide
Google RankBrain: The Definitive Guide

Google, in an interview to Bloomberg, said that RankBrain is the “third most important factor” when it comes to determining the order of the search results they show. (The other two being content and backlinks).

In this article, I'm gonna review RankBrain, what RankBrain algorithm is? How to optimize for google rankbrain? Let's dive in.

Here's what Rand Fishkin (@randfish) spoke on Optimisation for RankBrain.


What is RankBrain algorithm?

RankBrain is a machine learning (AI) algorithm that helps Google process and understand search queries.

Machine learning is an application of artificial intelligence (AI) that provides systems the ability to automatically learn and improve from experience without being explicitly programmed.

Before RankBrain was introduced, all Google Search Results were tweaked manually by engineers based on metrics they thought were useful (i.e. CTR, dwell-time or load speed).

Its not that post RankBrain implementation, human engineers are at rest, but that RankBrain has made their work efficient.

In short, RankBrain tweaks the algorithm on its own.

Depending on the keyword, RankBrain will increase or decrease the importance of backlinks, content freshness, content length, domain authority etc.

Then, it looks at how Google searchers interact with the new search results. If users like the new algorithm better, it stays. If not, RankBrain rolls back the old algorithm.

How RankBrain works?

RankBrain has two main jobs:
1. Understand search queries
2. Measure how people interact with the results

As I write above, RankBrain constantly tweaks the SERPs to find the most accurate rankings for a particular search query.

RankBrain uses semantic analysis to understand what the query is all about.

Clearly, RankBrain no longer just looks at keywords (and keyword density) but rather, it tries to comprehend the meaning behind your search.

For example if I search, “first product by lenovo”, then RankBrain produces the following accurate results.

first product by lenovo
first product by lenovo

In the past, pages where the keywords “first”, “product” and “lenovo” appeared the most and had the most relevance would be shown.

Similarly if I search for “who sings despacito”

who sings despacito
who sings despacito

As you've seen, Google cares more about the context and meaning of your query.

To achieve that, RankBrain groups words into concepts and searches pages that cover those concepts in depth.

It also takes into account the user's location. For instance, if you search for the “Cricket World Cup 2019 location” and are located in UK (World Cup host) , then it might show map directions. If you are located in the India, then it might just show information about the city where it is being hosted.

How RankBrain measures User Satisfaction?

Google’s ultimate goal is to show you the best possible set of pages and user satisfaction is at the core of Google search.

Although there is no actual satisfaction metrics released officially by Google, we can assume as to what those are.

Personal opinion: I would say RankBrain looks at-
  1. Organic CTR (Click Through Rate)
  2. Time-on-Site (aka. Dwell time)
  3. Bounce Rate
  4. Domain Authority
  5. Pogo Sticking (when you quickly leave a page and go back to the SERPs)

Based on these factors, RankBrain continuously moves pages until each page has achieved its deserved spot on the SERPs.

For instance, let’s say that most people
click on result #1,
skip results #2 and #3,
and click on result #4, spending a lot of time in the #1 and #4 results.

RankBrain tracks this and gives result #4 a promotion the next time when someone searches for that keyword. It also demotes results #2 and #3 because they were not appealing.

With the tons and tons of search queries that Google receives, RankBrain has a lot of data to work on and pick best results.

How does Google Rank Search Results?

As mentioned earlier, the results are ranked by:
1) keyword relevancy,
2) number of backlinks and
3) Rankbrain.

Following question now arises, How do I optimize for RankBrain?

Keyword Research and RankBrain

As you saw, Google can now understand the intent behind a keyword.

So does that mean that traditional keyword research is dead?


That said, you may need to tweak your keyword research process so it’s more RankBrain-friendly.

Here’s how:

Optimise Title and Description Tags for CTR

As you saw in above, organic CTR is a key RankBrain ranking signal.

The question is: how can you get people to click on your result?

There’s no doubt about it: emotional titles get more clicks.

This is something copywriters have known for years. Off late, this idea has been backed up with data. In fact, CoSchedule found a clear correlation between highly emotional headlines and social shares.

CoSchedule Emotional Headline Result
CoSchedule Emotional Headline Result

For example, here’s a generic SEO-optimized title tag:

Productivity Tips: How to Get More Done

Not bad. But it lacks the “instinct” that urges people to click.

Here’s how one can tweak that title tag into an emotional powerhouse (while keeping it SEO-friendly):

Smash Your To-Do List With These 10 Productivity Tips

Now it's not always relevant to create highly-emotional titles. But whenever you can, you should.

Add Brackets and Parentheses to the End Of Your Titles

This is my all-time favorite CTR hack.

I read about a study that HubSpot and Outbrain did a few years back:

In that study they analysed more than 3 million headlines  and they found that brackets outperformed bracketless titles by 33%.

Here are some examples of brackets and parentheses you can use:
  • (2019)
  • [Infographic]
  • (New Data)
  • [Report]
  • (Case Study)
  • (Proven Tips)

So, now you see.

Use Numbers (And Not Just on List Posts)

The data from several sources (including BuzzSumo) is clear: numbers improve CTR.

The best part?

You can use numbers in your title… even if your content isn’t a list post.

For example, last year I came across this case study:

Backlinko Post
Backlinko Post

As you can see, Brian Dean included not one, but two numbers in the title.

Don’t Forget to Optimize Your Description Tag for CTR

Yes, description tags don’t directly help with SEO anymore. That said, I’ve found that an optimized description can significantly boost your CTR.

Here’s how to create a description tag that gets results:

First, make it emotional.

Just like with a title tag, you want your description tag to convey some emotion.

Here’s an example:

Add emotion to titles
Add emotion to titles

Next, sell WHY someone should click on your result.

Is your content comprehensive? Based on research? Funny? Sell that in your description:

Sell your blog post
Sell your blog post

Then, copy words and phrases that paid ads (AdWords) use.

For example, when I search for “dog food” I see this phrase appear in three ads:

Keywords Adsense
Keywords Adsense

So you’d want to include the phrase “pet food” in your meta description.

Finally, include your target keyword.
Google makes it bold, which can help your result stand out.

Optimise Content for Bounce Rate

Well, you need to show Google that your result makes their users happy.

And the best way to do that? Improve your dwell time.

Does Google REALLY Use Dwell Time? Yup!
Dwell time is the amount of time a visitor spends on your site after clicking on your site link from search results.

It goes without saying, the longer someone spends on your page, the better. This sends Google a message: “Man, people are LOVING this result. Let’s push it up a few spots”.

And if someone exits your site after 2 seconds, that tells Google: “This result sucks! Let’s keep it down a few spots”.

So it’s logical that RankBrain would measure Dwell Time — and shuffle the results around based on this signal.

In fact, a Google employee recently said that Google used to rely 100% on off-page signals (especially backlinks).

Google Machine Learning
Google Machine Learning

And the data backs this up. When we analyzed a massive set of Google search results we found a correlation between high rankings and low bounce rate:

High Rankings and Bounce Rate
High Rankings and Bounce Rate

Reduce Bounce Rate and Boost Dwell Time

Now it’s time for me to share a few simple strategies that you can use to increase your site’s dwell time.

Push Your Content Above the Fold

When someone clicks on your site from Google, they want their question answered NOW.

In other words, they don’t want to scroll down to read your content.

That’s why it's highly recommended removing anything that pushes your content below the fold, like this:

Above the fold
Above the fold

Instead, you want the first sentence of your content front-and-center:

First Sentence Front and Centred
First Sentence Front and Centred

That way, you’ll hook your reader right off the bat.

Use Short Intros (5-10 Sentences MAX)

Believe it or not, but I spend MORE time on my intros than my headlines.

That’s because your intro is where 90% of your readers decide to stay… or go.

And after A LOT of testing I’ve found that short intros work best.


When someone finds something on Google, they already are aware about that topic. So there’s no need for an explanatory introduction.

Instead, use your intro to sell the content they’re about to read, like this:

Use Short Intros
Use Short Intros

Publish Long, In-Depth Content

I’ve tested this ten ways to Tuesday. And I can tell you with confidence that:

Longer content = better Dwell Time.

It goes without saying it takes longer to read a 2000-word guide than a 400-word blog post. But that’s only part of the equation.

The other reason that long form content improves Dwell Time is the fact that longer content can fully answer a searcher’s query.

For example, let’s say that you search for “how to drive a car”.

And the first result that you click on is a 300-word post. It kind of answers your question… but leaves you wanting more.

So you click on your back button to find something better (as you might remember, Google calls this “Pogo-sticking”).

And this time you hit the jackpot.

You find a comprehensive guide that covers EVERYTHING you need to know about driving a car.

So you grab a cup of coffee and read the guide from start to finish. You even re-read certain sections. All this reading is racking up serious Dwell Time.

Long form content works so well that I tend to publish content that’s at least 2,000 words.

Break Up Your Content Into Bite Size Chunks

Let’s face it:

Reading 2,000 words is HARD.

And it’s even harder if those 2,000 words are presented as a giant wall of text.

Fortunately, there’s a simple way to get around this problem: subheaders.

Subheaders break up your content into comprehensible, bite-size chunks. This improves readability, and therefore, Dwell Time.

I use plenty of subheaders at TechGydbySM.com for this exact reason.

All in all, I try to toss in a subheader for every 200-250 words of content.

Target Keywords that RankBrain loves

It seems like the days of long-tail keyword targeting are gone.

Earlier, it made sense to create content for different but closely related long tail keywords like:

Best physics books for students
Best student physics book

Each page having meta tags optimized specifically for each long tail variation.

Nowadays, that SEO technique is dead.


Because with the advent of RankBrain conceptual search, long tail keywords are now grouped into concepts rather than specific wordings. The previous example looks like

(Best, Top) <–> (Student, College) <–> (physics book)

Also any possible combination of those keywords leads to practically identical search results.

Thus, optimizing for long-tail keywords is not effective in 2019 anymore.

So what’s the alternative?

Optimise for medium tail keywords

Unlike long-tail keywords where both search volume and competition are rather small or medium-tail keywords generate a good amount of traffic (and thus healthy competition).

Infact, a post won’t rank very high for just “SEO”, it will rank high for tons of long-tail variations. Only if that blog post is written perfectly.

How to make your medium-tail keywords even better?

To help RankBrain understand what your blog post is all about you should include natural variations of your keywords in your article (known as LSI keywords).

For example if you are writing about “push ups”, you can mention keywords like “push ups for beginners”, “perfect pushup”, “pushups for chest”.

All these LSI keywords help RankBrain associate the concepts easily.


RankBrain is a great algorithm that continuously modifies itself to provide searchers with the best results.

SEO in 2019 needs proper understanding of RankBrain. Keyword targeting is not just a long-tail game but a much deeper contextual battle.

If you want your blog to rank at the top, you need to do the following:

  1. Write in-depth contents.
  2. Include different forms of your keywords.
  3. Provide satisfaction to viewers, that they keep coming back for more.

If you liked this article, why not check out my other posts on SEO.

Also drop a comment if you have other ideas as well. It really motivates me to do more work and help you guys further.

July 01, 2019

What is SEO? [Beginner's Guide]

Did you know there are over 1.6 Billion Websites on the world wide web? Imagine, the crowd out there! Have you got any plans on standing out of that crowd and giving your website a unique position when people search on Google, Yahoo or Bing?

What is SEO? [Beginners Guide]
What is SEO? [Beginners Guide]

Welcome to the world of SEO.

In this article, I have explained about SEO from its basics that will enable you to do SEO for your website all by yourself. Let's get started.


  1. What does SEO stand for?
  2. How does SEO work?
  3. Which factors affect SEO?
  4. The 8 most important SEO factors to rank high:
    1. Domain Authority
    2. Keywords
    3. Relevancy and Context
    4. Number of Inbound and Outbound links
    5. Site Speed
    6. Clean and responsive design
    7. URL structure
    8. Length of your content
  5. How to Start with SEO of your new blog?
  6. Which tools can you use for SEO?
  7. Why should you do SEO?
  8. What are SEO backlinks?
  9. Are these tips just for Google SEO?
  10. Are there any other alternatives to SEO?
  11. How can you learn SEO?
  12. A final word

What does SEO stand for?

SEO stands for Search Engine Optimisation. It shows the logic behind the ranking of websites when you perform a search on a particular search engine.

SEO is a marketing discipline that focuses on increasing the organic (non-paid) search engine results.

SEO ranking includes the necessary and technical creative elements to drive traffic and increase awareness in the search engine.

There are many aspects of SEO, from the words of your page to other sites on the web, linking you on the way.

Breakdown of SEO
Breakdown of SEO

Remember SEO is not only about making Search Engine friendly websites rather it is about creating Visitor Friendly page.

S.E.O. traffic is the secret for big bloggers to make money.

Let's see what Bluehost has to explain:

How does SEO work?

When you search for a term on any search engine like Google, the results that you are presented with is a list of websites that have your search query and websites that bear a high domain authority.

For example when you search for ‘dog food’, the top results are the ones that are practising the best SEO practices in the eyes of Google.

This is primarily because search engines use advanced crawlers that collect the information on every website, storing every bit of content it can find on the Internet.

That creates an index for every website that is compared to the algorithm that Google has built for the best SEO practice.

Look at what Matt Cutts from Google explains how this all works:

Which factors affect SEO?

There is a set of on-site and off-site factors that Google and other search engines favour when ranking every site.

Although there are at least 200 factors that affect your site rank, one can improve their website by simply working on a few of them.

SEO factors
SEO factors

The 8 most important SEO factors to rank high:

1. Domain Authority

Domain Authority (DA) is a trust meter. This metric shows how much trust your domain has built overtime via backlinks and age. In simple English:


Similarly, the older your domain, the higher its domain authority.

There is another important related factor too. It is the relevance of the domain name in respect to the main keywords you are targeting.

For instance, seocentro.com will be more likely to rank better than techgydbysm.com for “SEO” related queries.

As of late, I've noticed that short URLs the to have greater SERP than long URLs.

One can also boost their domain authority by building backlinks to their website.

2. Keywords

SEO starts with choosing the right keywords (which one may find using Google’s Keyword Planner or Ahrefs).

Whenever I work on a brand new blog, my strategy is to start by picking a medium to low competition keywords and then gradually upgrade my post to target more competitive terms.

If you want to rank up quickly then you should include LSI keywords (keywords that are synonyms to your target terms).

For example, a site that talks about “digital cameras” can also include terms such as “digital watches”, “digital locks for home appliances” and so forth. Make sure to include the keywords that you want to rank for in the title and in the sub-headings for perfect on-page optimization.

3. Relevancy and Context

Search engines today are smarter than ever before.

They are now capable of making out the difference between a relevant page and a plagiarized one.

I recommend sticking to a niche when a site is just sprouting out and cater content specific to that particular niche.

For me, my niche is Blogging and SEO.

4. Number of Inbound and Outbound links

SEO score is directly related to how many relevant links you point out to.

Same goes for inbound links (backlinks) which are actually more favoured, especially if they are coming from prestigious, relevant and popular sources.

You can get backlinks by getting yourself featured on big .edu or .gov sites for example.

5. Site Speed

Google has always prioritised how quickly a site loads. To speed up your site you can use a CDN to deliver your content in a faster way.

6. Clean and responsive design

Keep it clean and simple. In fact, Google favours websites that have mobile-friendly design than ones that don’t have.

WordPress users can install the AMP plugin to have your site load blazingly fast. If your site is not using WordPress, you should learn how to make use of the accelerated mobile pages project by Google or can apply amp templates.

7. URL structure

A URL is a human-readable text that was designed to replace the numbers (IP addresses) that computers use to communicate with servers.

Here are two examples:
a) https://www.techgydbysm.com/2018/05/what-is-seo-how-to-increase-traffic.html

b) https://www.techgydbysm.com/2018/05/post-id1234-ret2d.html

Clearly (a) is better because it’s descriptive and to the point.

Several studies have confirmed that the shorter the URL, the better. But try to integrate your target keywords in URLs for adding the spice to your SEO.

8. Length of your content

Whenever you are writing a blog post that you want to rank, you want to make sure you are including as much detail as possible.

Search Engines have been rewarding long-form content and in 2019, you won’t rank unless you write at least 1500-2000 words per post.

In fact when you are writing long form contents, you get to explore a topic in depth, which in turn increases the time that some visitor spends on your site and Google understands your content is awesome.

How to Start with SEO of your new blog?

So what strategy do I follow?

I covered the step-by-step plan here, but it can be summarized as:

Find medium-tail keywords that have a decent volume
Create long content that is 1500+ words
Build backlinks by guest posting
That’s it. There’s not much more to it.

Which tools can you use for SEO?

There are many useful tools out there. My favourite ones are (they are all free!):
  • Keywords Everywhere to understand the volume and competition of my queries
  • Ahrefs to analyze each url and see who’s linking to them and what keywords they rank for
  • Google Search Console to see how my site is performing over time.

I use those tools for 90% of what I do. For the remaining 10% such as backlink building tools and others, read my complete list of SEO tools.

Why should you do SEO?

That's exactly the point. Why are we worrying about SEO?

SEO has the capability to drive tons of quality leads to your website for free.

For instance, when you search for "table lamps", aren’t you more likely to become a client of whoever shows up on Google?

This is the power of search engine optimization.

It brings you decent leads that you can later deliver ads to or even sell products to.

What are SEO backlinks?

Backlinks are simply links from an external site to yours. For example, when I link to this popular tool, I am generating a backlink for them. The more high quality backlinks your blog gets, the higher the domain authority and SERP of your blog.

Therefore, building strong backlinks to your blog is a key SEO task if you want to reach page #1.

Are these tips just for Google SEO?

Google dominates the search engine space with almost 63,000 searches per second on any given day. Yahoo and Bing have the remaining space about 9% each. Most importantly, people now are trapped in an Android ecosystem.

Google being default search engine. Any strategies for SEO applied to your blog keeping in mind Google only will help you in all other search engines too.

Are there any other alternatives to SEO?

Having known that SEO’s main purpose is to generate organic traffic to your site, you can also fetch more visits by means of ads (like Google Adwords or Facebook ads), through affiliate links and get quoted in articles in highly trafficked sites.

How can you learn SEO?

To add up, the best way to learn SEO is by doing it all by yourself. The more organic, genuine and unique content you write on your responsive blog, the better results you should expect.

However, SEO requires time. So be patient and have the courage to fulfil your dreams. It took me at least a year and a half to start noticing some regular traffic on my site.

Becoming an SEO expert is not an easy and short time task. It is a continuous process of trial and errors and the steps that eventually lead to success.

If you are interested to learn SEO, check out my top SEO posts and also consider subscribing to my newsletter.

In case you want to learn how I do SEO? Check this post.

A final word

To drive in organic traffic into your blog, SEO is only one way. There are other methods of driving traffic as well. A loyal fan base and social media followers can gush in plenty of traffic to your blog.

June 24, 2019

Compare Two Strings Without strcmp

The following is a C Program To Compare Two Strings Without strcmp on screen after taking input from the user. Previously I have posted about the same only using the strcmp command. You can go check that out first. Let's get started.

Compare Two Strings Without strcmp
Compare Two Strings Without strcmp



gets() function is used to obtain input as a string and printf() function is used to print the string on the screen.
cmpstr() is a function that illustrates C standard function strcmp(). Strings to be compared are sent as arguments to cmpstr().


int cmpstr(char s1[10],char s2[10]);
void main()
    char arr1[10]="Demochar";
    char arr2[10]="demochar";
    printf(" %d", cmpstr(arr1, arr2));
    /*cmpstr() is equivalent of strcmp()*/
    /*s1, s2 are strings to be compared*/
int cmpstr(char s1[10],char s2[10])
    /*strlen function returns the length of argument string passed*/
    int i=strlen(s1);
    int k=strlen(s2);
    int greater;
    else if(i>k)
    /*loops 'greater' times*/
    for (i=0;i<greater;i++)
      /*if ascii values of characters s1[i],s2[i] are equal do nothing*/
      if (s1[i]==s2[i])
      /*else return the ascii difference*/
        return (s1[i]-s2[i]);
    /*return 0 when both strings are same
    This statement is executed only when both strings are equal*/


Different Output for Equal and Unequal Strings
Different Output for Equal and Unequal Strings

All programs compiled in this post are compiled in AnDOSBox.


Every character in string1 is compared to its corresponding character in string2. Once the loop finds a different character in the strings, it would return the ASCII difference of the different characters and exit.

Books I Prefer:

I hope this article was helpful to understand C Program To Compare Two Strings Without strcmp! Comment below, if you've got any question. Head back soon for another interesting article on C Programming.