Page 1 of 1

Redirect Google Indexed Pages that no longer exist to Error 404

Posted: Wed Jul 10, 2019 4:30 pm
by tstreets
I had an issue on my board where it was nailed by spam and I didn't clean it up right away. As a result, the spam pages were indexed by Google. These spam pages were then flagged as violating Google Adsense policies. I've removed the spam topics and users and resynced the board. However, since Google has indexed the links Adsense claims my site now is "Valuable Inventory: No content" due to it sees 3,000 pages displaying "Information: The requested topic does not exist."

I would like to find a way to redirect links that no longer exist to a bogus link that displays Error 404 so these links are no longer indexed by Google and dropped. I believe this will resolve my issue.

Has anyone done this or have any pointers on how to accomplish it? I believe I need to simply redirect using the code in "viewtopic.php" but I'm usure what to edit without breaking the code.

Here an example link: http://www.coupleslist.com/viewtopic.php?f=329&t=2824

Any help would be appreciated!

Tim

Re: Redirect Google Indexed Pages that no longer exist to Error 404

Posted: Wed Jul 10, 2019 4:52 pm
by Brf
That "Information: The requested topic does not exist" page is already returning 404.

Re: Redirect Google Indexed Pages that no longer exist to Error 404

Posted: Wed Jul 10, 2019 4:59 pm
by warmweer
tstreets wrote:
Wed Jul 10, 2019 4:30 pm
I had an issue on my board where it was nailed by spam and I didn't clean it up right away. As a result, the spam pages were indexed by Google. These spam pages were then flagged as violating Google Adsense policies. I've removed the spam topics and users and resynced the board. However, since Google has indexed the links Adsense claims my site now is "Valuable Inventory: No content" due to it sees 3,000 pages displaying "Information: The requested topic does not exist."
...
I don't really see what phpBB can do about this. The topics don't exist anymore and if you don't have a list of all those topics, then how can you do anything about it with phpBB.

Re: Redirect Google Indexed Pages that no longer exist to Error 404

Posted: Wed Jul 10, 2019 5:45 pm
by tstreets
My goal here is to send Google to a blank "Error 404 this page does not exist" outside of PHPBB so they will drop these previously indexed pages that were spam topics. PHPBB is doing what it's designed to do, tell a live person this topic does not exist. However, I believe search engines see this default "this topic does not exist page" as an actual page with no content and keeps this as a valid page.

I believe this is in the error handling in the code on viewtopic.php, specifically under trigger_error('NO_TOPIC');. I'm all for putting this in as a temp fix until these pages are dropped from Google.

Re: Redirect Google Indexed Pages that no longer exist to Error 404

Posted: Wed Jul 10, 2019 5:59 pm
by Brf
Yes. Google would be getting a 404 page for that link.

Re: Redirect Google Indexed Pages that no longer exist to Error 404

Posted: Wed Jul 10, 2019 6:13 pm
by tstreets
Interesting. The link I included in this post was the example link that they included in their reasoning as to why my board (which has been running for 8 years without issue with Adsense) has been flagged with no content. I wrongfully "assumed" it's because they see all of these blank pages in their index. If they are getting a 404 error when accessing them I don't get it. Thank you for the clarification, I appreciate it.