Issue with INavigationRoot (childsites) and Google

Hi Forum,

I have an issue with INavigationRoot and Google. I have a Plone 4.3.17 instance with a Plone site with several subfolders that need to appear as autonomous Plone sites to the everyday user. I have made childsites with new navigation roots by way of Dexterity contenttypes. Every childsite has its own domainname (virtual host with proxy_pass on nginx) and template.

Example:
www.parent.xyz/subfolder/child1 ==> www.childsite1.xyz
www.parent.xyz/subfolder/child2 ==> www.childsite2.xyz
www.parent.xyz/subfolder/child3 ==> www.childsite3.xyz
www.parent.xyz/subfolder/child4 ==> www.childsite4.xyz
etc

The issue is that in Google the articles published on the Plone parentsite are also found under the domainnames of the childsites. And the articles of the childsites are in Google also found under each other domains.

Example:

The article www.parentsite.xyz/articles/thisisanarticle is in Google also found under:
www.childsite1.xyz/thisisanarticle
www.childsite2.xyz/thisisanarticle
www.childsite3.xyz/thisisanarticle
www.childsite4.xyz/thisisanarticle
etc

In Google the domainnames of childsites also appear to the everyday user as mainsite with the subfolders and articles of other childsites as part of it

Example:
www.childsite1.xyz/child2/articleonchild2

I do not want this to happen. Every childsite has to appear as real autonomous Plone site to Google and the everyday user. What to do about this? The articles only need to be found under there own domains. How can this be done with childsites (INavigationRoot) on Plone?

Thanks in advance,
J.

I think https://github.com/collective/collective.lineage and its 'extensions' is a good start.

Thanks Espen, I am gone look in to Lineage. Decided long time ago not to use the extra software for creating childsites because it can be done with INavigationRoot in the ZMI, but if it solves the above issue with Google.......

Hi!

I usually use apache in this way:

for every site virtual host do:

Include /etc/apache2/list_rewrites.txt

and then in Include /etc/apache2/list_rewrites.txt put:

RewriteRule ^/child2/ http://www.childsite2.xyz/ [R=301,L,NC]
....
RewriteRule ^/child4/ http://www.childsite4.xyz/ [R=301,L,NC]

and so on. This works and you've just one file to update.

1 Like

This works because Google sees the redirect and don't consider it as an url to put in the index. You can use 302 instead of 303 to make some tests, when you're sure put 301.

Hi,

Thank you. This helps to rewrite subfolders to there distinct childsites.

On Nginx the include and location directive can be used for this

include //usr/local/etc/nginx/list_rewrites.conf;

And in list_rewrites.conf:

location ~ ^/childsite1(.) {
rewrite ^ http://childsite1.xyz//$1;
}
location ~ ^/childsite2(.
) {
rewrite ^ http://childsite2.xyz//$1;
}

etc

But, the articles of one site are also found by Google directly under the domainname of childsites without the subfolders . Example:

The article http://www.mainsite.xyz/subfolder/this-is-an-article-about-football is also found under the domain http://www.childsite4.xyz//this-is-an-article-about-football. This way I need to make rewrite rules for every article on every childsite.

Looks like it is solved with the RewriteRule for Nginx. The last example I mentioned was an other issue. Thank you!!

Plone Foundation Code of Conduct