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
-
Should I nofollow/noindex the outgoing links in a news aggregator website?
We have a news aggregator site that has 2 types of pages: First Type:
Technical SEO | | undaranfahujakia
Category pages like economic, sports or political news and we intend to do SEO on these category pages to get organic traffic. These pages have pagination and show the latest and most viewed news on the corresponding category. Second Type:
News headlines from other sites are displayed on the category pages. The user will be directed to that news page on the main site by clicking on a link. These links are outgoing links and we redirect them by JavaScript (not 301).
In fact these are our websites articles that just have titles (linked to destination) and meta descriptions (reads from news RSS). Question:
Should we have to nofollow/noindex the second type of links? In fact, since the crawl budget of websites is limited, isn't it better to spend this budget on the pages we have invested in (first type)?0 -
Why add .html to WordPress pages?
A site I may take over has a plugin that adds .html to the pages. I searched online but I’ve only found how to add it rather than why to add it. Is it needed? If I remove it, I’ll have to be careful with SEO / indexed pages and redirects. The site is running 3.x.x and 90% of the plugins have not been updated in over 5 years including this one. Before I update to 4.7.x, I am trying to understand the landscape (pros / cons) on why something could be used and if I need to find a suitable replacement for it.
Technical SEO | | acktivate2 -
Recipe Wordpress Plugin - Structured Data?
We have been using this plugin for years: https://wordpress.org/plugins/ziplist-recipe-plugin/ and it appears that it's causing us serious problems in Google. So we're looking for either a new plugin or possible directions on if we should custom build an option into our site. Ultimately we're looking for the best setup for the Recipes on our site to obtain a Featured Snippet. Thank you!
Technical SEO | | FabulesslyFrugal0 -
Best practice to handle Wordpress Categories/Tags
Hello Mozzers, I am sure a lot of people here are using wordpress. How do you handle Categories & Tags? I came across that they produce a lot of duplicate content in the google index. My website is brand new so I don't have any traffic yet, how would you handle it? noindex, follow? Or block /categories/ and /tags/ from robots.txt? Probably I am completely wrong with both ways? I am grateful for your answers! Best regards!
Technical SEO | | grobro0 -
Way to spider Wordpress site
I have an old Wordpress site and I want to move it to a new server and take it off Wordpress (too many hacks). I am trying to spider the site so as to get static, non-Wordpress, pages. I am having trouble doing this. When I spider the site, it changes the URLs. For instance, if the URL is www.domain.com/page/ the URL I get out of the spider is /page/index.html And those are not the URLs in the search engine indices. There are about 2000 pages on this site, so it is not feasible to set up 301 redirects. I tried using these spidering programs: WinHTTack Website Copier and PageNest Does anyone know of another method of turning a Wordpress site into a non Wordpress site?
Technical SEO | | DanCrean0 -
How do you handle Wordpress sitemaps within your site?
I have a regular site map on my site and I also have a Wordpress site installed within it that we use for blog/news content. I currently have an auto-sitemap generator installed in Wordpress which automatically updates the sitemap and submits it to the search engines each time the blog is updated. The question I have (which I think I know the answer to but I just want to confirm) is do I have to include all of the articles within the blog in the main site's sitemap despite the Wordpress sitemap having them in there already? If I do include the articles in the main website's sitemap, they would also be in the Wordpress sitemap as well, which is redundant. Redundancy is not good, so I just want to make sure.
Technical SEO | | iresqkeith0 -
Authorship and Publisher on WordPress
I successfully enabled rel=publisher on our WordPress blog, and as a test I also enabled rel=authorship for a set of blog posts. (Tested both in Google's Rich Snippets Tester.) However, on the individual blog posts the publisher credit disappears. Is there a way to enable both to appear on blog posts?
Technical SEO | | ufmedia0 -
Site migration from Drupal to WordPress - Question about Drupal Back end
This is really a developer/Webmaster issue. The closest category available to select was "Technical SEO" - but technically, this isn't a question about SEO, per se. I am doing free SEO work for a local arts organization as my way of giving them a charitable contribution. Despite my advice to stay on Drupal and improve the site on its current platform, they want something easier to manage for volunteers. This is perfectly understandable, although not my recommendation. Of course, not knowing anything about SEO, their first impulse was to simply shut down the old site, cancel all of their old pages, point the domain to their new WordPress site and completely start over. Thank goodness I yelled "Halt!" before they went this far 🙂 They really have no idea what they are doing and I want to help guide them through this process in a way that preserves as much as possible their inbound links (they have tons of .edu and .gov links because they are a local community arts organization). Of course they don't understand how valuable these are, so I have a lot of educating to do. I am trying to get them a quote from a professional developer to help migrate from Drupal to WordPress. The only login information anyone has been able to send me is login to their FTP. No one seems to have a login for the Drupal CMS back end, and when I asked for it they looked like deer caught in headlights Can someone tell me, or even send me a screenshot of what the admin login page looks like for a Drupal site, so I can explain better to this client what I am looking for? I have no experience with Drupal, but surely, there is a backend where the site pages and content can be updated.? There must also be a database of customers/registrants, etc. not to mention a place where all the meta tags, etc can be entered and stored? Last but not least, if no one is able to find their site's Drupal login info, is there any way under the sun for me to retrieve it for them? I have a Developer in mind whose got loads of experience migrating from Drupal to WP, but he needs a .sql export file with the contents of the curent databse in order to give us a quote. Does anyone have any advice? (Other than "This should teach you not to offer your services up to charity!" LOL)
Technical SEO | | danatanseo0