Redirect Google Indexed Pages that no longer exist to Error 404

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
tstreets
Registered User
Posts: 3
Joined: Wed Jul 10, 2019 4:17 pm

Redirect Google Indexed Pages that no longer exist to Error 404

Post 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
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53413
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

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

Post by Brf »

That "Information: The requested topic does not exist" page is already returning 404.
User avatar
warmweer
Jr. Extension Validator
Posts: 11285
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

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

Post 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.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
tstreets
Registered User
Posts: 3
Joined: Wed Jul 10, 2019 4:17 pm

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

Post 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.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53413
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

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

Post by Brf »

Yes. Google would be getting a 404 page for that link.
Attachments
404jpg.jpg
tstreets
Registered User
Posts: 3
Joined: Wed Jul 10, 2019 4:17 pm

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

Post 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.
Post Reply

Return to “[3.2.x] Support Forum”