Stop Google from indexing parent folder URLs
.htaccess files are extremely useful in many cases for users who either do not have root permissions or for users who simply aren't comfortable in making changes in their web server's configuration file. Trying to debug .htaccess not working isn't always the easiest thing to do, however, hopefully by checking the discuss below mentioned about google, htaccess, search-engine-indexing, , .htaccess common problems as well as the troubleshooting tips, you'll have a better grasp on what you may have to modify to get your .htaccess file running smoothly.Problem :Here is my problem:example.com/images folder and subfolders contain all of my images for example.com site and sub pages.
Google is indexing those directories locations as URLs. For example.
/images/images/promotions/images/products
All are indexed by Google. I understand they are generated by apache but they are not intended to be URLs for humans.
I don't have .htaccess control as we are on Yahoo web hosting (I know). I can't use robot.txt to block use the entire directories as that will block the actual image assets.
Anyone have a smart workaround for me? Should I create /images/index.html and redirect it to the homepage? I hate to create a bunch of empty useless pages. I submitted to Google Webmaster URL removals but I am afraid someone else is linking to these directories and it will just cause it to get indexed again.
In the meantime, google mobility usability is giving me a low grade. People are having access to all of my image assets (well at least easier access to them).
Should I create
/images/index.html
If these are literally directory index pages that are being auto generated (and you don't have access to .htaccess) then yes, you'll need to create an index document in these directories. Either index.html or index.php if that works for you.
and redirect it to the homepage?
However, I would not redirect it to the homepage. (I can't believe you would be getting much real/meaningful traffic to these pages, apart from bots and people trying to steal your images en masse?)
Ideally you should send a 410 Gone in order to get these URLs removed from Google's index. In PHP:
<?php
header($_SERVER['SERVER_PROTOCOL'].' 410 Gone',true,410);
Or, if you can't send custom headers, then simply a soft-404 would be a "make do" (ie. a page that simply states "Not Found", but returns a 200 OK status) - it's unlikely to appear in search results, and contains nothing meaningful if it does. Or even just a blank page!?
Comments
Post a Comment