Forums

Adsense showing ads on blogs (19 posts)

  1. success2be
    Member
    Posted 5 years ago #

    The main page of my blog is showing adsense ads on blogs instead of the topic I'm posting. My blog is located at blog.mysite.com with mysite being an example and not the actual domain. If I click on categories or a specific post, then the adsense ads are related to my content.

    How do I fix this problem?

  2. moshu
    Member
    Posted 5 years ago #

    For example use "example.com" as advised by the WWW gurus and it is reserved exactly for that (i.e. you can NOT register it).
    mysite.com is a real website!

    So, who put the adsense code in your blog?

  3. drmike
    Member
    Posted 5 years ago #

    I'm trying to wrap my head around this but I'm not understanding this. If it's your blog, didn't you put the adsense there yourself? It sounds like you've places the script within the loop instead of outside of it.

    Can we see an example of this?

  4. success2be
    Member
    Posted 5 years ago #

  5. Chris_K
    Member
    Posted 5 years ago #

    https://www.google.com/adsense/support/bin/answer.py?answer=23168

    You might consider putting the targeting stuff in your theme's index.php on either side of the_content() call in The_Loop.

    That'll help google with that page.

  6. drmike
    Member
    Posted 5 years ago #

    Hmm, even I haven't seen that before. Getting tired of Adsense picking up on 'blog' all the time even with knocking them off.

  7. success2be
    Member
    Posted 5 years ago #

    I've wrapped the div tag <div id="contentmiddle"> and its inner guts with

    <!-- google_ad_section_start -->

    <!-- google_ad_section_end -->

    but I don't know if this is correct.

  8. Chris_K
    Member
    Posted 5 years ago #

    Well, you could wrap the div I suppose. Mine looks more like:

    <!-- google_ad_section_start -->
    <?php the_content(''); ?>
    <!-- google_ad_section_end -->

    Works well for me. I do that in my index.php and my single.php.

  9. gleff
    Member
    Posted 5 years ago #

    I'm having the exact same problem and I think the OP is saying that all the google ads are physically working, however google isn't picking up the content from the main page whereby it is working fine on all the other pages.

    I've tried putting comments with content into the index.php, page.php, single.php, header.php and footer.php and still the main page of adsense ads is showing ads about either blogs or wordpress, whereby all the other pages are showing ads related to the content.

    If you want to see what I mean. Check out my site at http://www.mysleepdisorders.info

    When you go to the page (you are in the main page), you'll see the ads show about blogs or wordpress. Then if you go to one of the blog entries, or pages, suddenly all the ads change to sleep related ads.

    If anyone has any suggestions I'd really like to know too.

    Geoff

  10. gleff
    Member
    Posted 5 years ago #

    never mind.. didn't work.

  11. gleff
    Member
    Posted 5 years ago #

    Ok.. I think I know what's going on.

    If you have a domain go to a site, it seems to be different somehow than if you go to the same site but with the index.php at the end.

    Eg.

    Go to my site. http://www.mysleepdisorders.info

    Now look at the adsense ads. They are showing ads for wordpress and blogs and the like.

    Now go to the same site with the index.php. Eg. http://www.mysleepdisorders.info/index.php

    Now the ads are showing sleep related stuff.

    Can someone tell me what the difference is between not using the index.php and using it. Something else must be loading in it's place first or something. I'm using a different theme btw.

    I want to be able to just use the domain to load the right part of the site because when people hit my site, they won't be putting in index.php in the url.

    Any suggestions?

    BTW.. if we can get over this hurdle, then I think I have the full solution to the OP's problem.

  12. Chris_K
    Member
    Posted 5 years ago #

    I already answered the problem. It's about telling google what to look at when determing contextual ads.

  13. carlocab123
    Member
    Posted 5 years ago #

    thanks handy solo!!! it worked but can you tell us how to put adsense only in the first post and it is wraped?

    truly yours
    carl ocab

  14. lvcjmac
    Member
    Posted 4 years ago #

    I'm having the same problem as gleff. On my main page, http://www.test.jabdeals.com, all of the adsense is related to blogs and rss feeds.

    All of my other pages in the blog show the properly related adsense, including /index.php, except for the main page. I've inserted the google targeting onto my index.php page, but I still am not getting the properly related adsense ads.

    What am I missing?

  15. picmax
    Member
    Posted 4 years ago #

    Well, I am having a similar problem. I ran the latest WordPress 2.2.3 but I have noticed the problem for a while. If I go to the front the page of the blog by address (http://dptnt.com), I see public service ad on the banner and a blank skyscraper ad on the right. If I visit my site like http://dptnt.com/index.php, all the Ads show up perfectly. It appears that "http://dptnt.com/" is the same as http://dptnt.com/index.html. The question is: where is the index.html coming from? I don't have that file in the directory at all.

  16. Storyman
    Member
    Posted 4 years ago #

    picmax, if I understand what you are saying correctly there is not an index.html file in your folder, but it appears in the URL address anyway.

    Either your .htaccess is rewriting the URL address or possibly permalink is doing a rewrite.

  17. picmax
    Member
    Posted 4 years ago #

    Storyman, it is possible.

    I checked the source files of both and they are slightly different but not much. I really don't understand why the ad is not showing up since all the contents and keywords etc are the same.

    I think I have fixed the problem (I hope). I edited the index.php file in the root directory so it reads "require('./<my WP directory>/wp-blog-header.php');" in stead of just "require('./wp-blog-header.php');". This doesn't seem to make any difference for index.php, but now the two sources for index.html and index.php are the same.

    I also added the the google_ad_section_start stuff around the center column for better targeting. However I don't think this fix the problem since I tried this first and it didn't work.

    Hope this helps.

    Max

  18. picmax
    Member
    Posted 4 years ago #

    Well, I guess I spoke too soon. It didn't completely fix my problem. Is this related to the built-in caching function? Next step, I will try to redirect all .html request to .php to see if this works.

  19. GlobalFlyer
    Member
    Posted 4 years ago #

    I am having this problem as well...any solutions?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags