Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Removing pages but not images

         

adresanet

9:43 am on Jan 16, 2015 (gmt 0)

10+ Year Member



Hello,

I am in the following situation:

my site hadn't Index -Options rule in .htaccess and googlebot had indexed all my folders even if it had index.html or not.

After that if i search in google images for a picture from my site google display the image but when I press Visit Page insted I go to the page.html from the site where the image is used I am going to the folder where the image is located.

So, for example, if in my-page.html I use <img src="main-photo-folfer/2015-nighs-pictures/picfile.jpg> if I search in google images for this image when I press Visit Page I will arive at http://example.com/main-photo-folfer/2015-nighs-pictures/ . This is not a good experience for me, as the site owner but it is also a bad experience for the visitors because there is a long list with name of all images under that folder.
So, I want to make a redirection using mode_rewrite and I will check where the folder 2015-nighs-pictures is used in my site and I will redirect the user to that page. This is the simple part.

What is harder is how should I proceed in terms of headers response. Should I use 301 Permanently Removed , 302 Temporary Removed or even 202 OK ? From the point of view of the visitors it is not a problem, he will be redirected the the correct page and it will be a good experience for him, but how will interpret this header googlebot ?

If I use 301 will he understand that all images from the folder are Permanently Moved to my-page.html ? Will he interpret something like Go to my-page.html because all this folder is moved to new address ? If it is acting in this way than I will lose all my rankings from image search. He will deindexing all my pictures because at my-page.html he won't find all the images from 2015-nights-pictures.

If I will return 403 Forbiden status for googlebot will it still index all the pictures from those folders ?
Will it replace the link to http://example.com/main-photo-folfer/2015-nighs-pictures/ with the correct one http://example.com/my-page.html ?

I am talking here about a site with over 1000 different folders which are located in the main-photo-folder.

Thank you for supporting !

[edited by: aakk9999 at 9:52 am (utc) on Jan 16, 2015]
[edit reason] Replaced mysite.com with example.com to avoid auto-linking [/edit]

lammert

11:17 am on Jan 16, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Is every picture folder associated with only one HTML file? In that case you can add a 301 redirect from that folder to the specific HTML file you want to use instead. But if a folder contains pictures which are associated with different HTML files it will be impossible to decide which page to redirect to.

adresanet

11:57 am on Jan 16, 2015 (gmt 0)

10+ Year Member



Some pictures are associated with page1.html while other pictures are associated with page2.html and so on. In the same time I have a main-page.html where I have small pictures linking to the correspondig html page which displays pictures from one folder and I am thinking to redirect to that main-page.html

But what should I use ? 301 redirect ?

phranque

7:36 pm on Jan 16, 2015 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



when the browser renders your HTML document and sees an img tag, what is going to happen to the request for that image file?

lucy24

8:06 pm on Jan 16, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This question is an offshoot of a longer thread elsewhere in this subforum. Most of that thread was concerned with the mechanics of redirection and the -Indexes setting. I suggested starting a fresh thread because there was one question I absolutely don't know the answer to.

In the long term, the problem will sort itself out: when the various /images/ auto-indexes are no longer available, any given blahblah.jpg image that comes up in image search will be associated with the real page it belongs to, not with the auto-generated index.

But in the short term, is there any way to remove all those auto-generated /index.html files from Google's index without inadvertently de-indexing the images that live in those assorted directories? I couldn't find anything in gwt that pertains to indexing specific filetypes.