How to stop Google from listing a file in search engine results

Oh no, Google is listing my secret file!

Oh no, Google is listing my secret file!

If it’s urgent then follow the tasks in Step 1 below.  If it isn’t that urgent and you can wait a few days/weeks till Google removes the listing then go to step 2.

Google is listing a file I don’t want them to!

On occasion, Google will start listing a file that you thought it wouldn’t find.  This tutorial will help you stop this from happening. 

Step 1 – Delete/Rename the file

  • Delete the file from your server.
  • Rename the file to something new.

Google will find the file again, but depending on your site it will probably take a day or two.


Step 2 – Ask Google to remove a listing

This step might not be necessary if you have deleted/moved/renamed the file.  However, if you want to use the same url or just get the entry removed then continue.

Sign up to Google Webmaster Tools: https://www.google.com/webmasters/

If you’ve already got a Google account it should just be a matter of signing into your account and confirming you wish to join Webmaster Tools.  Once you’re signed in, Click the Add Site button. Enter the url of your site.

Follow the instructions to prove to Google that the site belongs to you.  There are different methods for doing this but can be done by downloading and uploading a file with a unique name or adding a special code to the HTML coding of your sites’ homepage.

Click the Verify button.  Once Google has verified that the site belongs to you, you’ll get access to the Webmaster Tools.

It may take a while for Google to collect data for your web site and give you access to all the tools, but at this stage we are only concerned with preventing Google from listing a file in their search results.

  • Click Site Configuration
  • Click Crawler Access
  • Click “Remove URLs” tab
  • Then click the “Create a new removal request” button.  Enter the URL to the file location (this should be the url that Google is still listing) and follow the instructions.

Now you have to wait and hope Google honour the request.


Step 3 – Stop Google from re-indexing and listing your file again

To stop Google (and other search engines) from listing your file again, you need to instruct them to not index this file.  This is done using a special file called a Robots.txt file.  All the major search engines look for this file when their robots visit your site.  It contains special instructions and a set of rules telling the search engines how you want them to deal with your site.

You can create a robots.txt file yourself.  It is, as you may have guessed, just a plain text file that you can create using a program such as Notepad.  You will need to know and understand the format of the instructions, which can be complicated for a non-techie person.  Google Webmaster Tools however, has a robots.txt creation tool that makes the process nice and easy.

  • Log into Google Webmaster Tools.
  • Click Site Configuration
  • Click Crawler Access
  • Click the Create Robots.txt tab.

Follow the instructions.  You want to add a rule that blocks All Robots from accessing your file.

All Robots means that all search engines will (or should) follow the rule.

Choose the relevant drop downs and enter the url to the file.  This will be the new location and file name of the document/file you don’t want listed in the search engines.

As you add the rule you will see details added to the box below.  You can then click the button to download the file that’s been created.  You now need to upload the file to your server.  Your robots.txt must be uploaded to the root directory of your server/hosting account – the same location as your main homepage file.    This is top-level directory of your site and is usually named something like public_html.

That’s it!  In the future, all the search engines should find your robots.txt file, adhere to your instructions and not list your file in their results.

If you found this useful please leave a comment below.

Haydon Rouse

Haydon is a business consultant / mentor and an expert at marketing and selling online. He genuinely wants to help you and provide exceptional service. Why? Because, when he achieves that, you will tell your friends about him. Haydon has been marketing and selling online for over 20 years. He has lived in East Kent all his life (cough... over 49 years.. cough), knows the local area like the back of his hand and has fantastic customer service skills. You can contact him here.

Click Here to Leave a Comment Below

Leave a Reply:

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.