Wordpress SEO - Robots

newnerd

Newbie
Jan 19, 2013
49
9
I have a Word press Website.


I want search engine robots not to follow the Footer part of the site.


Where and what to write in the robot.txt file? Do I need to write anything on the footer.php file? - Please Help
 
Last edited:
As a security measure, your Wordpress robots.txt should read as follows:

Code:
#
User-agent: *
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content/plugins/
Disallow: /wp-content/cache/
Disallow: /wp-content/themes/
Disallow: */trackback/
Disallow: */feed/
Disallow: /*/feed/rss/$
Disallow: /category/*

This will block access to footer.php.
 
As a security measure, your Wordpress robots.txt should read as follows:

Code:
#
User-agent: *
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content/plugins/
Disallow: /wp-content/cache/
Disallow: /wp-content/themes/
Disallow: */trackback/
Disallow: */feed/
Disallow: /*/feed/rss/$
Disallow: /category/*

This will block access to footer.php.

I can see it will block wordpress pages to be crawled. Can you please tell me which link here will block footer only.

I don't think you can block only footer, because it part of page. You can block an entire page but not a part of it. But i am not 100% sure about it, ask suggestions from others as well.
 
If you don't want G to crawl the visible footer on you page you should put your footer content in a directory that you prohibit with robots.txt. Then you use an iframe to show the content in the footer. Make sure you also use the<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> on the page with the footer content in the prohibited directory.

In reality G bot will still "see" this content, but it won't be indexed.
 
Does this robot code makes any sense:

Code:
User-agent: *
Disallow: /*footer.php
and also using

Code:
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
in the home page above the <div class="Footer"> section.

[ The path of my footer file is:
/public_html/wp-content/themes/folder/footer.php

There is a link in the footer which is encrypted in functions.php
and the footer is being called by every page with the code
<?php get_footer(); ?>]
 
Last edited:
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock