Hi,
I’m puzzled by this one…
I create an About us Page, i put my content in and use default template (travel) and think I did it right, then I learn I’m being indexed for more paginated about us pages… /about-us/page/5/ … /about-us/page/6/
This is happening to all my pages. Contact us, Privacy etc. I can’t figure this out… I went into VC looked at ajax settings for template all looks good.
Any ideas?
Please
Hi,
Please try to disable all your plugins except of Visual Composer, reset your permalinks and clear cache then check those links, for example http://yoursite/about-us/page/5/ It should give 404 error.
Also please check if you have duplicates on your site.
Thanks!
Hi,
Please send an email at contact@tagdiv.com and provide wp-admin access so we can take a closer look, also paste a link to this conversation so we can knoe who you are and what your issue is.
Thanks!
Update: Continues to happen with no plugins activated. Although someone posted similar problem with yoast seo plugin and someone replied
Yoast SEO plugin will use get_the_excerpt as og:description and it’ll output it by default.
the default filter of get_the_excerpt: wp_trim_excerpt will use the_content as excerpt when post doesn’t have a native excerpt.
my solution is disable the get_the_excerpt in that particular page.
Maybe your template does the same thing? I don’t know, just wish it would stop generating multiple pages, i.e. /contact-us/page/3/, /contact-us/page/4/, /contact-us/page/5/ etc
Alin,
The problem also exists on your demo site:
view any page and add subpages, it doesn’t 404.
http://demo.tagdiv.com/newspaper/homepage-magazine/
then add the /page/2/ to the url and voila!
http://demo.tagdiv.com/newspaper/homepage-magazine/page/2/
http://demo.tagdiv.com/newspaper/homepage-magazine/page/3/
http://demo.tagdiv.com/newspaper/homepage-magazine/page/4/
http://demo.tagdiv.com/newspaper/homepage-magazine/page/5/
http://demo.tagdiv.com/newspaper/homepage-magazine/page/6/
etc
Hi Again,
After a few more hours of research, I believe this is a wordpress issue that has haunted webmasters for quite some time.
you can append any page number to the URL and, if the page doesn’t actually exist, WordPress will return a valid “200 OK” response and deliver the highest numbered existing page to the user. And not just for paged content — WordPress exhibits this behavior for any permalink on your site. This of course is not good from an SEO perspective, where an infinite number of URLs all pointing to the same page containing the exact same title, description, and content could potentially devastate your rankings.
Try it yourself! Add a page number to the end of any WordPress-powered URL and witness the insanity..
The worst part is that WordPress does this for not only multipaged posts and comments, but for any post or page. Try it yourself on any WordPress site on the Web — just append some number to the end of any URL and watch WordPress work its magic.
I will try this fix later, was curious to know anybody’s thoughts on this..
FIX: https://perishablepress.com/wordpress-infinite-duplicate-content/
<?php // malicious post page ordinal fix by Jeff Morris
// [post URL for reference]
global $posts, $numpages;
$request_uri = $_SERVER['REQUEST_URI'];
$result = preg_match('%\/(\d)+(\/)?$%', $request_uri, $matches);
$ordinal = $result ? intval($matches[1]) : FALSE;
if(is_numeric($ordinal)) {
// a numbered page was requested: validate it
// look-ahead: initialises the global $numpages
setup_postdata($posts[0]); // yes, hack
$redirect_to = ($ordinal < 2) ? '/': (($ordinal > $numpages) ? "/$numpages/" : FALSE);
if(is_string($redirect_to)) {
// we got us a phantom
$redirect_url = get_option('home') . preg_replace('%'.$matches[0].'%', $redirect_to, $request_uri);
// if page = 0 or 1, redirect permanently
if($ordinal < 2) {
header($_SERVER['SERVER_PROTOCOL'] . ' 301 Moved Permanently');
} else {
header($_SERVER['SERVER_PROTOCOL'] . ' 302 Found');
}
header("Location: $redirect_url");
exit();
}
}
?>
To implement this technique, just place it into your active theme’s functions.php file. Consider this a “beta” fix and test thoroughly. I have tested this successfully on WordPress 2.3 and 2.9, so it will probably work fine on just about any version of WordPress in use today.
This solution “fixes” the infinite duplicate content issue on the server-side of the equation. It eliminates the extraneous URLs by redirecting them to their canonical counterparts. Search engines will always find the canonical versions of your pages thus eliminating any duplicate content.
Conversely, using the canonical tag is more of a “cosmetic suggestion” that fails to resolve the issue in a reliable way. As Matt Cutts states several times in his presentation on canonical links, it’s always better for site admins to resolve any potential duplication issues on their site at the upstream end. Similar ideas are expressed in this video on the canonical tag.
Hello,
Thank you for this solution. It will help people who struggle with this issue.
I have tested this fix and it works. You have to be careful where you place it otherwise you get a syntax error. You can place it in functions.php and remove the php tags. . The result: http://screencast.com/t/kUoR1f8M
Thank you!
