homepage Welcome to WebmasterWorld Guest from 54.237.98.229
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Google / Google AdSense
Forum Library, Charter, Moderators: incrediBILL & jatar k & martinibuster

Google AdSense Forum

    
Is AdSense causing 404 errors?
londrum

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4432191 posted 5:52 pm on Mar 22, 2012 (gmt 0)

im trying to narrow down a problem that i've noticed in the last couple of days, where a visit to a particular page on my site will result in a 404 redirect.
the page loads okay, but after a second or two it will redirect to a 404

when i turn javascript off, the problem disappears. and when i turned the AdSense ads off, the problem disappears. So i can only assume that a javascript file that is supposed to load with AdSense is missing.

Obviously that is not something that i can fix at my end, so i was wondering if anyone else has noticed this in the last few days?

its the 336x280 box or 300x250 box that im having problems with, and it happens about 50% of the time. so maybe its because of a particular type of ad, like an image one?

 

londrum

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4432191 posted 6:08 pm on Mar 22, 2012 (gmt 0)

...i've set up a custom 404 file in my .htaccess file (which i've had on there for years), and i've just noticed that if i comment that line out, the problem disappears too.

presumably the file still cannot be found, but it no longer redirects to my custom 404 file. why would that be?

DeeCee



 
Msg#: 4432191 posted 6:23 pm on Mar 22, 2012 (gmt 0)

I've seen something similar with custom error pages, if not set up correctly. Like in pointing to virtual path not allowed, or not found. Removing the config pointing to the custom page then seem to be "fixing" the problem. In the logs it shows up kind of funny.

Are you sure the old custom page was working overall? If you asked for a bad page, you actually saw that custom 404 page?

I have seen similar problems with 403 pages, where I needed to add special directory permission in Apache to make it work. Specifically, in that case, I had filtering that would issue a "Deny" on seeing certain UAs. But rather than showing the custom 403 page, that internal redirect request would of course get a 403 as well, but now on the 403-custom (same UA, my mistake). :)

I had to put conditionals around access to the custom page, to prevent the error page from getting blocked too.

So in your case, could the 404 error in this case actually be because some other error is happening, and Apache on its way to show a custom error page instead hits a 404 because it cannot access the path for the 404 custom within that virtual host? A 404 on the 404-custom?

The log entries can get a bit confusing when those internal redirects happen. At times the error code shown in the log actually refer to something not expected.

[edited by: DeeCee at 6:28 pm (utc) on Mar 22, 2012]

londrum

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4432191 posted 6:28 pm on Mar 22, 2012 (gmt 0)

if i put the line back into the htaccess file then the redirect works as planned.
i can write in a nonsense URL and i get my custom 404 page.

if i take the line out, then i just get the normal generic 404 page. so i'm pretty sure its working okay.

this is what i've got in the htaccess file... i dont have anything else around it.

ErrorDocument 404 /docs/404.php
DeeCee



 
Msg#: 4432191 posted 6:36 pm on Mar 22, 2012 (gmt 0)

You mention the redirect happens "after a second or two". Could it be a host or call that is timing out, host mis-typed, ..

You call it a redirect. Is your browser redirecting the page, or is the 404 code just showing in the server log? If the browser redirects, you might want to look at the HTTP headers passed around?

londrum

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4432191 posted 6:53 pm on Mar 22, 2012 (gmt 0)

its the browser that's redirecting after a second or two. but it's definitely responding to something that AdSense fetches, because that's the only thing that makes the error disappear after i turn it off.

i've tried turning off everything else on the page one-by-one, including by own JS files, images and ads, and its AdSense.

i suppose the browser is trying to fetch an AdSense javascript file, or something, cant find it, and then redirects to my custom 404. but when i turn the custom 404 off, the page stays on the screen, as if everything is okay. the ads still appear okay too.

very frustrating!

ive tried looking at the headers for the 404, but there are no clues there. it just shows my original page.

...actually... does adsense pre-fetch stuff from the sites listed in the ads? maybe it is one particular site in the ad that's the problem, rather than adsense itself.

DeeCee



 
Msg#: 4432191 posted 7:08 pm on Mar 22, 2012 (gmt 0)

No, the ad-show does not call on the sites doing the advertising.

When I mentioned checking headers, I was thinking of using such as the LiveHTTP add-on for Firefox to see which headers and requests are being sent back and forth. Not so much the individual page's headers.

LiveHTTP should be able to show you specifically what is being requested and the timing of it all.

The fact that it is ending up doing a 404 on your server tells you that it is asking for something on your server. Otherwise the 404 error would land somewhere else.

londrum

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4432191 posted 7:57 pm on Mar 22, 2012 (gmt 0)

aha, thanks...

the only 404 that comes up is from adsense. it is trying to fetch a very long URL which starts with
/doubleclick/DARTIframe.html
...but it's trying to fetch it from my domain. so thats why its redirecting to a 404 on my site -- it thinks that i'm the host

but the referrer for that URL is
googleads.g.doubleclick.net

do you know of a way to ignore a directory in htaccess without sending a 404?

DeeCee



 
Msg#: 4432191 posted 11:58 pm on Mar 22, 2012 (gmt 0)

Ahh..

Different issue. You are having an actual ad issue. You don't want to ignore dartiframe.html. (DART Iframe)
That is apparently something needed if your site (that problem page only maybe) uses iframes and ads.
If you are not a DoubleClick direct customer, it would seem to be a bug from Google, if they are serving badly formatted ads from double click.


From DoubleClick/Google help site:


Set the path to DART Iframe.html

If your site uses iframes, you must download the DARTIframe.html file to successfully run Rich Media ads in your website. (See Downloading the DARTIframe.html File for more details). DoubleClick recommends that you put this file in a directory named doubleclick at the root directory of your web server.

If you can't store the DARTIframe.html file in the recommended directory, use an attribute in an ad tag to specify the directory where this file is stored on your web server. This attribute is mtfIFPath=value, where value is the path to the directory (from the root of the web server) where the DARTIframe.html file is stored.

For example, store the DARTIframe.html file here:

http:[//]www.mywebserver.com/files/dclk/

To specify the path to this file using the mtfIFPath attribute, edit an ad tag like this:

http:[//]ad.doubleclick.net/adi/N270.maheshdfasite/B3140338.2;dcopt=1_ist;mtfIFPath=/files/dclk/;sz=0x0;ord=[timestamp]?


The brackets on "[//]" is mine. Not from actual page.

londrum

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4432191 posted 9:19 am on Mar 23, 2012 (gmt 0)

perfect, thanks for your help with this deecee

londrum

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4432191 posted 10:39 am on Mar 23, 2012 (gmt 0)

just to mention one last thing... maybe its my imagination, but i seem to be getting a better variety of image ads on my site now that i've fixed this.
i have an events section, for example, and a lot of the ads are now about the actual event, rather than just the general subject.

maybe if you dont set this up, a lot of the doubleclick ads are blocked from appearing.

...might be worth trying, if you use image ads

DeeCee



 
Msg#: 4432191 posted 11:03 am on Mar 23, 2012 (gmt 0)

Good to hear.

Yeah, it would be blocked on pages with Iframes.

Can I ask, what are you doing with IFrames?

What exactly is supposed to be in the /doubleclick/DARTIframe.html file.

londrum

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4432191 posted 11:19 am on Mar 23, 2012 (gmt 0)

i dont use iframes myself, but i've got one of those social media 'addthis' buttons on there which generates one

the file just seems to generate a
<script> block, validates the parameters in the url, and reports any errors back to doubleclick. its not very big.
DeeCee



 
Msg#: 4432191 posted 3:34 pm on Mar 23, 2012 (gmt 0)

Shoot.. I did not think of that. I have those as well in some areas. I have never seen a call-back for that file, though. I guess I'll have to keep an extra eye out for it.

Strange that Google/Adsense would now have pointed that out to people or fixed it yet. That has the potential to hit many sites they display ads on.

Add:

I take that back.. It is all over Google Groups.

DeeCee



 
Msg#: 4432191 posted 3:45 pm on Mar 23, 2012 (gmt 0)

Old problem BTW, See this webmasterworld link: [webmasterworld.com...] from 2008.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google AdSense
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved