WordPress.org

Ready to get started?Download WordPress

Forums

Best practice for changing the file name of an image? (8 posts)

  1. Christiaan
    Member
    Posted 5 years ago #

    What's the best practice for changing the name of an image?

    Is there a plugin available? Or do I need to manually change the file name on the server, then in any posts its in, and then in the database?

    P.S. the reason I want to change the name is because Googlebot is not letting remove images from Google Image using robots.txt, so I want to change the image file names completely.

  2. Ivovic
    Member
    Posted 5 years ago #

    changing filenames is a manual and problematic process. You should simply consider preventing hotlinking.

    http://www.google.com/search?q=hotlink+protection+htaccess

    google *will* respect your robots.txt if you give it time. Case in point: ever seen a flickr image on google? they even have a form you can use to remove links from their index.

    google it ;)

  3. Christiaan
    Member
    Posted 5 years ago #

    Thanks, but I've given Google two months now and it still won't respect my robots.txt. I've used the removal form too, but it keeps denying me even though I have the correct robots.txt in place.

    I also prevent hotlinking already but I have about 30 images already on Google Image (which eat through bandwidth).

  4. Christiaan
    Member
    Posted 5 years ago #

    So, presumably I need to change the file name, then change any relevant html in my posts, then change the name in the database?

    Is this correct? If so, what field and table do I change the name in?

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Where is your robots.txt file? Give us a link to it, maybe we can help you fix it.

    Robots.txt *does work* with Google, so if it's not working, then the problem is somewhere on your end.

  6. Christiaan
    Member
    Posted 5 years ago #

  7. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Hmm.. Well, this bit:

    User-Agent: *
    Allow: /

    is unnecessary and might confuse some robots. I'd remove it.

    The rest should be fine.

  8. Christiaan
    Member
    Posted 5 years ago #

    I've already tried it without that bit. Still didn't work.

    The reason I added it is because when you use Google's own robots.txt generator it recommends it.

    So does anybody actually know how to change a image file name in the database?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags