Mobile app version of vmapp.org
Login or Join
Sarah324

: Will google remove the old caches if noarchive is added to robots.txt If you want google's cache of your site to remain unchanged is it a good idea to add noarchive to robots.txt? Or will

@Sarah324

Posted in: #Google #RobotsTxt

If you want google's cache of your site to remain unchanged is it a good idea to add noarchive to robots.txt? Or will this wipe out your caches?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Sarah324

2 Comments

Sorted by latest first Latest Oldest Best

 

@Cugini213

The only problem is, it could take a month before Google re-crawls your entire site.

add_action( 'wp_head', 'add_meta_tag' );
function add_meta_tag() {
echo '<META NAME="GOOGLEBOT" CONTENT="NOARCHIVE">';
}



Add this PHP to your child themes functions file
Then re-build your site map
And submit the sitemap URL to Webmaster Tools > Crawl > Fetch as Google

10% popularity Vote Up Vote Down


 

@Yeniel560

Firstly, there is no such thing as noarchive in robots.txt. You need to add a meta tag to all pages on which you wish to prevent caching:

<meta name="Googlebot" content="noarchive">


When you have done that, then Google will stop caching the page entirely and won't show a cache link at all. There is no way to keep showing the old cache while preventing new caches.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme