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 can i safely eliminate wordpress unused tags?
Hi Over several years I used many tags ( more then 1000 ) on my wordpress website 😞 but most of them haven't any view and haven't any clicks on google search . now I want delete this old - useless - unused tags but I'm worried about seo problem like many 404 pages and problems like this . Does anyone have safe way to delete these wordpress tags? how can i safely remove them?
Technical SEO | | markdoel0 -
Where to put 301 redirects in my Wordpress htaccess file?
I have about 25 301 redirects in my Wordpress htaccess file, that look like this: <code>Redirect301/store/index.html https://www.notesinspanish.com/store-home/</code> At the moment they are at the bottom of my htaccess file, below the usual Wordpress rewrite rules: <code># BEGIN WordPress <ifmodulemod_rewrite.c>RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress</ifmodulemod_rewrite.c></code> So they are below all that. Above my WP rewrite rules I have a number of other rules from plugins (caching, ssl). Are my 301's OK where they are at the very bottom of that file? They are working, and redircting pages correctly. Should they be somewhere else? Many thanks for any help. Thanks for any help.
Technical SEO | | Benspain0 -
Should we change the publish date in WordPress when updating a post?
Hi everyone, We're going through some of our old posts in our WordPress blog and updating them, adding new information, new links, and photos. My question: If we update the posts significantly, should we also update the "published" date to today? If we only correct some typos or a dead link, we don't touch the date. However, if we've done some real work on the post, we'd like to update the published date in order to bring it to the top of our blog feed and draw new attention to the post. However, I'm a little nervous that this could be seen by Google as spammy, as it's not technically a new post and the URL already exists in Google's index of our site. Here's an example of a post that was published several years ago and then updated a few week's ago with new information (and a new date stamp): http://www.eurocheapo.com/blog/barcelona-tip-five-cheap-eats-under-e6.html Any thoughts on this? Thanks, Tom
Technical SEO | | TomNYC0 -
Duplicated content in news portal: should we use noindex?
Hello, We have a news portal, and like other newspapers we have our own content and content from other contributors. Both our content and our contributors content can be found in other websites (we sell our content and they give theirs to us). In this regard, everything seems to work fine from the business and users perspective. The problem is that this means duplicated content... so my question is: "Should we add the noindex,nofollow" tag to these articles? Notice that there might be hundreds of articles everyday, something like a 1/3 of the website. I checked one newspaper which uses news from agencies, but they seem not to use any noindex tag. Not sure what others do. I would appreciate any opinion on that.
Technical SEO | | forex-websites0 -
Updating old blog posts in Wordpress to appear more recent?
I'm doing work for a law firm that has a lot of blog post content from 2010-2011 ranking for long-term keywords. These pages are displaying date snippets in SERPs, but because legal information can change year to year, I don't want the content to appear as though it's 2-3 years old. The date of the post is in the URL structure, so I can't change the publication date w/o changing the URL. So my question is twofold: is there a way to show an updated date snippet in search results, or block the date snippet from showing, even if the date is in the URL? Or are there other options - creating pages for each of these posts and 301ing them to the page that has a cleaner URL, etc.? Thanks in advance for your help!
Technical SEO | | dchristensen30 -
Lost with conical, nofollow noindex. Not sure how to use it on a dyanmic php site with multiple region select options
I have a site with multiple regions the main page after a region is selected is login.php but the regions are defined by ?rid=11 , 12, etc. These are being picked up as duplicate content but they are all different regions. As i hired external php coders to develop most of the site I am scared to start meddling with any of the raw code and would like some advise on how to not show these as duplicate content. should i use noindex nofollow or connical? if Connical how do i set it up on the main login.php page? p.s. i am an extreme nube to seo
Technical SEO | | moby1230 -
Fixing a wordpress 404 error for /feed and /comments/feed?
I have a wordpress site that does not have a blog currently. I'm getting a 404 for /feed and /comments/feed. Anyone know how I can fix?
Technical SEO | | DM50 -
WordPress & Page Numbers
Hi, I am working on a large WP site for a client and have an issue with duplicate content and page numbers. I am using the Yoast SEO plugin but can't seem to resolve the issue. Let me give an example: If I go to a popular category, for example F1, there are over 10 pages of content for the category and although the URL changes, the Title and Meta Description stay the same. Now...if I was using a template for the title and description I could add the page number variable, but as I am overwriting the template with SEO specific category information I can't use variables and hence the problem! This is such a common problem I know somebody will have an answer! Thanks
Technical SEO | | JonathanSmith0