Block URLs by password-protecting your server directories

30/11/2019

If you have confidential or private content that you don't want to appear in Google Search results, the simplest and most effective way to block private URLs from appearing is to store them in a password-protected directory on your site server. Googlebot and all other web crawlers are unable to access content in password-protected directories.

If you're using Apache Web Server, you can edit your .htaccess file to password-protect the directory on your server. There are a lot of tools on the web that will let you do this easily.

NEXT: BLOCK SEARCH INDEXING WITH META TAGS

* Nguồn: Google Search Console