Fixed Soft delete VS hard delete posts - Google AdSense

Moshe1010

Well-known member
It's not a bug, but more of a request because the master of the internet (Google) thinks differently, and it could make some major problems.
When Google AdSense detects that a thread has violated it's policy, it would send an email with a direct link to a thread and ask to remove it in 72 hours. I had these several times with vBulletin, and I just soft deleted them with no problem and Google left me alone.

However, this is not the case with XF. When I soft delete a thread, and a gust (Google bot) would try to visit it, it would get a username/password request (because admins/moderators still have the ability to visit this thread). Google thinks that the thread is still there, but is accessible to users only, and therefore keeps sending notices that this thread is still exists and wasn't removed. Only when I hard-deleted the thread, the issue was resolved.

In vBulletin, when a thread was soft deleted, a user would get a soft 404 ("you don't have sufficient permissions to access this thread/section"), so Google would think the thread is gone.

Thus, I think that a soft 404 would be more appropriate for soft-deleted threads in order to keep Google on track.


Thanks.
 
Last edited:
That's a really bizarre behavior and I can't really find any documentation on it. Various things seem to indicate that the requests are manually verified so the response code and exact content shouldn't necessarily be an issue if the data has been removed.

However, I will move this to future fix. In terms of "correctness", there's nothing incorrect about telling someone they need to login (which would then tell them they couldn't view it, depending on who they logged in as). Changing this is technically more "wrong" though it's an edge case (telling you it doesn't exist except if you login as a moderator, you can see it).
 
On the other hand, a (soft) deleted thread or post is actually deleted. So for a bot (or any guest) there is like no chance to get to see the content. Furthermore, I pledge a (soft) deleted thread or post should throw the same message like a hard deleted one for those who have no permission to see it. Because it is deleted.

I mean, Windows doesn't look into the Recycle Bin either but says "mimimi xxx.dll wasn't found" instead. Even if xxx.dll was in the Recycle Bin.

I think this is different to a thread in a private forum (which is not deleted).
 
Either way, it's an AdSense policy violation to display an ad on an error page of any sort... so regardless if it's a 403 or 404 error, you can't display AdSense on it. Fixing that on your site will indirectly solve the issue that this thread is about.

Side note - you also can't put AdSense ads on registration or login pages.
 
Either way, it's an AdSense policy violation to display an ad on an error page of any sort... so regardless if it's a 403 or 404 error, you can't display AdSense on it. Fixing that on your site will indirectly solve the issue that this thread is about.

Side note - you also can't put AdSense ads on registration or login pages.
The problem is not adSense position on error/registration page. The problem is that Google sends you a link to a thread that has violated their policy (let's say one of your users posted a cracked software). When you soft-delete this thread, Google still thinks it's there since it generates 403 error (login page) instead of 404.
 
I heard that too. Once Google complains about a page, they want to find a 404 as their deadline arrives. Doesn't even matter if you remove your ad code from that page.
 
Either way, it's an AdSense policy violation to display an ad on an error page of any sort... so regardless if it's a 403 or 404 error, you can't display AdSense on it. Fixing that on your site will indirectly solve the issue that this thread is about.

Side note - you also can't put AdSense ads on registration or login pages.
Yes same as your forum.
I restricted adsense on 404 pages, contact form, login, error with login and registration :)
 
That's a really bizarre behavior and I can't really find any documentation on it. Various things seem to indicate that the requests are manually verified so the response code and exact content shouldn't necessarily be an issue if the data has been removed.

However, I will move this to future fix. In terms of "correctness", there's nothing incorrect about telling someone they need to login (which would then tell them they couldn't view it, depending on who they logged in as). Changing this is technically more "wrong" though it's an edge case (telling you it doesn't exist except if you login as a moderator, you can see it).
How about soft delete makes a copy (thus changing the thread-id?), that as transparent as we can go with returning a 404 and still keeping the soft deleted thread around.
 
The problem is not adSense position on error/registration page. The problem is that Google sends you a link to a thread that has violated their policy (let's say one of your users posted a cracked software). When you soft-delete this thread, Google still thinks it's there since it generates 403 error (login page) instead of 404.
Actually, that's not the case... if Google sends you a policy violation and you leave the page up, but remove AdSense from the page, you are fine.
 
Yes same as your forum.
I restricted adsense on 404 pages, contact form, login, error with login and registration :)
How do you do this?
The problem with ad_above_content is that it's global, not caring if its a login or registration page
 
Not sure since I don't insert ads via a template, but I assume you could probably use the {$controllerName} and {$controllerAction} to insert some logic into that template.
 
Actually, that's not the case... if Google sends you a policy violation and you leave the page up, but remove AdSense from the page, you are fine.
You're not that fine because they state that you may have other links that violate their policy on your website and the link they've sent you is just an example out of many. Good luck trying to find these violating links if you have a medium-big board (which you do). In my case it was just one thread (it's alway just one), and I've always managed to soft-delete it and the issue was resolved, but not this time. I wrote them a letter that I've deleted the thread (after I've hard deleted it), and they've lifted my ban.
 
I use this:

Code:
<xen:if is="!in_array({$contentTemplate}, array('error', 'search_form', 'search_form_post', 'search_form_profile_post', 'search_results', 'register_form', 'login', 'error_with_login'))">
AdSense code here
</xen:if>
 
I use this:

Code:
<xen:if is="!in_array({$contentTemplate}, array('error', 'search_form', 'search_form_post', 'search_form_profile_post', 'search_results', 'register_form', 'login', 'error_with_login'))">
AdSense code here
</xen:if>
You're still showing ads on 404 pages.
 
Back
Top Bottom