Wordpress noindex
-
Hi there,
Does anyone no of a way to noindex all the "previous entries" pages in a wordpress blog. They usally show on domain.com/page/2/ etc. They are the small snippets that provide a summary of the all your posts.
I've not been able to find a plugin to do this.
Thanks so much!
-
Thanks, this helped me
-
Brilliant. Glad I could help.
-
I fully understand that. People at my work fully advocate the use of plugins, I personally believe that somethings should be hard-coded into the theme (This being one of those things).
Chances are once you find an SEO plugin you tend to stick with it until you notice issues or find one that does things better.
I'm surprised that WordPress doesn't do more to help prevent duplicate content.
-
Thanks so much Ben, This has done exactly what I wanted
-
I agree Ben, that coding into the theme itself is the best way to do this - however since there are a few ways to do this task - we wanted to offer various solutions.
-
Also, if you use the plugin to set the posts to no-follow and you want to change SEO plugin changes are those settings won't be transferred, if you code the solution into the theme its plugin independent and (in my eyes) the best way to go about avoiding duplication in WordPress.
-
This seems overly complex for a coding solution. All you need is 3 lines of code (max) in header.php of your theme (See my reply above)
-
That will only put noindex on the date archives.
I noticed the same problem and wrote an article on how to avoid duplication in WordPress. For a fresh WordPress installation with 10 published posts, Google ends up indexing close to 30 URLs, all pointing back to just 10 unique articles, because of the date, author and category archive pages.
In header.php of your theme add the following code:
1){ echo ''; } ?> '; } ?> '; } ?>
If you want, this could be condensed to:
$paged > 1 || is_author() || is_trackback()){ echo ''; } ?>
You can read more at my blog: http://www.laceytechsolutions.co.uk/blog/wordpress-development/avoiding-duplicate-content-in-wordpress
-
There is a plugin way – and a coding way…
I will explain both
Plugin version is good for individual posts / coding way is a mass archive way…
PLUGIN VERSION
Using a plugin called WordPress SEO by Yoast.. you can go into the previous posts and do the following.
Open the POST dashboard in your WordPress blog.
Find the post/s you are interested in working with.
Click ‘Edit’ post
Then scroll down to the WordPress SEO by Yoast section on the bottom anc click ADVANCED
From there.. you can select noindex / nofollow for that post – as well as a few advanced meta tags.
You can do this for any or all of your posts…
CODING VERSION
Step 1
In your theme folder locate the following files:/wp-content/themes/yourtheme/
Archive.php
Header.php
Open them both up.
Step 2
First thing to do is SAVE the header file as:header-archive.php
with that new version open add the following code into the header section:
Then save it.
Upload that file to your wp theme folder online.
Step 3 now go to the open archive.php file and find and replace the following:
FIND:
REPLACE WITH:
Save and upload that file to your theme folder as well.
Now you have just MASS added a NOINDEX / NOFOLLOW to all of your archive pages – but NOT the individual post pages themselves.
Hope this helps!
-
It should.If that does not work for some reason, try Yoast. One of these 2 plugins should be able to deindex these pages for you. I presume you are using the latest version of Wordpress as well as the Plugin.
-
hi najul.. Thanks, I already use allinone seo, and have that option selected, but it hasn't put noindex on these pages.
-
hi syed.
Thanks for the post.. I did that a couple of months ago, and it has removed the description, but the pages are still indexed. I'm trying to get them deindexed.
Thanks
-
If you use All in One SEO Plugin, you can enable a setting where you can set a Noindex on all the Archive level pages. I hope this helps.
-
I don't know of any plugin that does this but why not simply do it via robots.txt:
<code>User-agent: Googlebot Disallow: /page/specificfolder/</code>
where 'specificfolder' could be '/2/' as in your example (domain.com/page/2/) - it would simply noindex all content under that specific folder.
Also, if you want to noindex specific pages/posts, you could do it by using this plugin: http://yoast.com/wordpress/meta-robots-wordpress-plugin/
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
How to fix Submitted URL marked ‘noindex’
Hi I recently discovered Google has stopped crawling/indexing my post.
Technical SEO | | Favplug
So i had to check my Search console then i saw this Coverage issues saying “Submitted URL marked ‘noindex’”. And anytime I tried Requesting Indexing For the affected pages, Its tells me “Indexing request rejected”. Here is my site URL: http://bit.ly/2kfqTEv Here is one of the affected pages http://bit.ly/39aMenJ0 -
Robots.txt vs. meta noindex, follow
Hi guys, I wander what your opinion is concerning exclution via the robots.txt file.
Technical SEO | | AdenaSEO
Do you advise to keep using this? For example: User-agent: *
Disallow: /sale/*
Disallow: /cart/*
Disallow: /search/
Disallow: /account/
Disallow: /wishlist/* Or do you prefer using the meta tag 'noindex, follow' instead?
I keep hearing different suggestions.
I'm just curious what your opinion / suggestion is. Regards,
Tom Vledder0 -
How to force Wordpress to remove trailing slashes?
I've searched around quite a bit for a solution here, but I can't find anything. I apologize if this is too technical for the forum. I have a Wordpress site hosted on Nginx by WP Engine. Currently it resolves requests to URLs either with or without a trailing slash. So, both of these URLs are functional: <code>mysite.com/single-post</code> and <code>mysite.com/single-post/</code> I would like to remove the trailing slash from all posts, forcing mysite.com/single-post/ to redirect to mysite.com/single-post. I created a redirect rule on the server: ^/(.*)/$ -> /$1 and this worked well for end-users, but rendered the admin panel inaccessible. Somewhere, Wordpress is adding a trailing slash back on to the URL mysite.com/wp-admin, resulting in a redirect loop. I can't see anything obvious in .htaccess. Where is this rule adding a trailing slash to 'wp-admin' established? Thanks very much
Technical SEO | | james-tb0 -
Squarespace or Wordpress for a Photographer
Hi, I was wondering if people would recommend squarespace or wordpress for a photographer. I'm mainly curious about how wordpress uses internal links for their images and squarespace images exist on http://static1.squarespace.com. Wouldn't a photographers website, one that focuses on images, be better on wordpress for this readson?
Technical SEO | | mattdinbrooklyn1 -
Transferring a site to wordpress and its effect on SEO
I have a site that is hosted on a very old platform and would like to move it to WordPress. We are a surf shop and the summer months are the busiest for us. I want like to make sure that if I transfer my site that it won't hurt our rankings in any way. What would the best way of doing this be? i.e start building the WordPress site and once it is finished, point the domain to it? Will this have any ramifications for our rank? Thank you!
Technical SEO | | FierceFrame0 -
Wordpress: Should your blog posts be noindex?
Wordpress defaults all blog posts to no index/nofollow Is this how it should be handled? I understand the nofollow from the page.com/blog to the page.com/blog/blogtitle But why noindex? We have Yoast installed and this is the default.
Technical SEO | | cschwartzel0 -
Wordpress Woocomerce Recommended SEO URL structure
Hi Mozzers ! Thanks for looking. I have a new shop in development (http://www.vintageheirloom.biz), I'm now using WordPress & Woocommerce. I've asked Woocommerce whether it is possible to remove the 'shop' and 'product-category' categories. They say it is, but it isn't recommended, it can slow site speed & create possible duplicate pages. I'm wondering what seasoned SEO experts opinions are on my particular structure? I've heard that a flat structure is recommended, but ecommerce shops as I understand pose their own issues, so any feedback would be appreciated.. Here's some URL examples: http://vintageheirloom.biz/shop/bags/ - this for the category bags http://vintageheirloom.biz/product-category/bags/shoulder-bags/ - this for shoulder bags a child of bags category http://vintageheirloom.biz/shop/2-55-bags/vintage-chanel-caviar-skin-2-55-bag/ - a product The last URL contains the category 2-55 bags. The products name also includes the phrases 2-55 bag. Should this level of repetition be avoided or is it best to keep the whole phrase 'vintage-chanel-caviar-skin-2-55-bag/' for SEO purposes? Thanks for any help you can give me around this issue! Kevin
Technical SEO | | well-its-1-louder0 -
Disabling Wordpress Attachment Posts
having issues with every media (photo) we upload creating an additional page on the blog that is being indexed in Google. ie. post: www.mysite.com/ creates this for the photo used: www.mysite.com/blog/category/image-name/attachment/800px/
Technical SEO | | bozzie3110