Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2020-07-08 23:29:09

Elementair
Member
Registered: 2020-02-28
Posts: 14

Prevent google from indexing PID pages

Hi
As said in title, I d like to prevent google from indexing PID pages and only ID

I found that tweak, adding this  code to viewforum.php viewtopic.php ( from http://fluxbb.fr/forums/viewtopic.php?id=12020 )

if(!isset($_GET['pid']))
define('PUN_ALLOW_INDEX', 1);

Is it the good way to do it?

Last edited by Elementair (2020-07-31 23:50:41)

Offline

#2 2020-07-09 05:08:05

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 1,355
Website

Re: Prevent google from indexing PID pages

Try this robots.txt if the forum is at the root of the site.

User-agent: *
Disallow: /a
Disallow: /c
Disallow: /d
Disallow: /e
Disallow: /l
Disallow: /m
Disallow: /p
Disallow: /r
Disallow: /s
Disallow: /u
Disallow: /*pid=

Offline

#3 2020-07-09 20:41:00

Elementair
Member
Registered: 2020-02-28
Posts: 14

Re: Prevent google from indexing PID pages

It's not at the root but i'll simply add  /siterep before it.

I did it with misc.php, profile.php, but /p /m etc is smarter and doesn't interfer with my files.
Thanks.
I'll try that

Offline

#4 2020-07-28 11:47:00

Elementair
Member
Registered: 2020-02-28
Posts: 14

Re: Prevent google from indexing PID pages

I use this as sitemap

sitemap: /extern.php?action=feed&type=rss&show=50

as well as the mod sitemap.php so I had to remove /e and /s and it's working well

Problem is that already referenced pages on google just gave me a warning on Google Search Console but won't be deleted if there's not the noindex directive.

I tried to add the

Noindex: /*pid=

but I found that Google ignore this directive in the robots file since 2019.

I'm back to the first solution ( add the piece of code to  viewforum.php viewtopic.php) ; is that the best solution to add the noindex to .pid pages ?

Last edited by Elementair (2020-07-31 23:51:03)

Offline

#5 2020-07-28 12:23:03

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 1,355
Website

Re: Prevent google from indexing PID pages

Maybe instead of

Disallow: /*pid=

need to use

Disallow: /*?pid=

?

Offline

#6 2020-07-29 00:39:24

Elementair
Member
Registered: 2020-02-28
Posts: 14

Re: Prevent google from indexing PID pages

disallow: /*pid= 

does the job, but for already indexed links, I only have a warning that 1,03k links are indexed despite they are blocked by the robots.txt file.

This disallow prevent crawling and indexing, but does not remove already indexed links.

Offline

Board footer

Powered by FluxBB