Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEO Duplicate Content (page included) #16

Open
olape-git opened this issue Jul 22, 2022 · 7 comments
Open

SEO Duplicate Content (page included) #16

olape-git opened this issue Jul 22, 2022 · 7 comments

Comments

@olape-git
Copy link
Member

It's not about functions for the user or the handling, only about SEO.

Shortly declared: A Page with expandcontract and subpages a1, a2, a3, a4, ...
Now we have the texts that are individually on the pages a1, a2, a3, and a4, all also on page a. --> DC (page included)
My idea for this, add "noindex, nofollow" via JS for pages a1 - a4.
If the bot can JS, it finds on a1 - a2 "noindex, nofollow", if it can not JS, there is the default setting of the page from the plugin meta or the global setting from the configuration, so most likely "index, follow".

@olape-git
Copy link
Member Author

olape-git commented Jul 25, 2022

<script> function changerobots() { document.getElementsByTagName('meta')["robots"].content = "noindex, nofollow"; } window.onload = changerobots; </script>
This works as far as you can test it in the browser console.
I have now placed the script in the head via OGra_XH.
The question is: Is there the desired effect also with the search engines?

Update:
<?=onload();?> must be out of the body tag

@olape-git
Copy link
Member Author

It seems to work

Google Search Console

Crawling
Zeit 25.07.2022, 09:22:21
Gecrawlt über Googlebot für Smartphones
Crawling erlaubt? Ja
Seitenabruf: Erfolgreich
Indexierung zulässig?: error Nein: "noindex" im Meta-Tag "robots" erkannt

@olape-git
Copy link
Member Author

This was how it looked before

Google Search Console

Crawling
Letztes Crawling: 23.07.2022, 19:25:24
Gecrawlt über Googlebot für Smartphones
Crawling erlaubt? Ja
Seitenabruf: Erfolgreich
Indexierung zulässig? Ja

@olape-git
Copy link
Member Author

Now it is not purposeful if you have to use the plugin OGra_XH to get the script into the head of the page.
Therefore the question: Is it useful to create this possibility in the plugin itself?

@cmb69
Copy link
Member

cmb69 commented Jul 27, 2022

I wouldn't do this with JS anyway. Either leave it to the user (manually via meta_tags plugin), or do it automatically by assigning to $cf['meta']['robots'] (that's the hard part, unless you do it for all hidden pages, what might generally be a good idea).

@olape-git
Copy link
Member Author

Unfortunately, there is no solution with only one variant.

A bot without JS would find only the links to the corresponding content (a1 - a4) on the page with the plugin call for expandcontract, but would find "index, follow" on pages a1 - a4 - so everything is correct.

A bot with JS finds the entire content on the page with the plugin call for expandcontract, but on the pages a1 - a4 "noindex, nofollow" - again everything correct.

Since it depends on JS, I see no other way than to regulate this also via JS.
According to Google Search Console it works as desired.
You can also test it with the browser.

@olape-git
Copy link
Member Author

unless you do it for all hidden pages, what might generally be a good idea

I actually do not believe that. There are also variants where hidden pages should be indexed, sometimes it is just that it should not appear in the menu.
For example this https://www.cmsimple-xh.org/de/?Repostitory-Info
If you remember, there was even once the discussion that one has a variant to list these pages nevertheless also in the Sitemapper, which does not work at the moment. Just like the other way around, i.e. taking normal pages out of the sitemapper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants